1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.3 Facebook OG Tags.

Discussion in 'XenForo Questions and Support' started by Okenyon, Sep 2, 2014.

  1. Okenyon

    Okenyon Active Member

    Where should I be posting full Facebook OG tags on XF?
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    The og data is already in the templates.

    What are you trying to do?
     
  3. Okenyon

    Okenyon Active Member

    Update the image, title, description etc.

    Using debugger I get "
    The 'og:url' property should be explicitly provided, even if a value can be inferred from other tags.
    "

    I used your FAQ to add the image @Brogan
     
  4. rainmotorsports

    rainmotorsports Well-Known Member

    Is your board url properly set? I would assume thats where the url is generated from.

    Double check the source real quick. Ours is like:
     
  5. Okenyon

    Okenyon Active Member

  6. rainmotorsports

    rainmotorsports Well-Known Member

    In the admin control panel
    Home > Options > Basic Board Information and then Board URL
     
  7. Okenyon

    Okenyon Active Member

    All set up correctly - when I share on FB it shares the right meta data minus the image but maybe thats cached?

    However on OG debugger I get the above errors.
     
  8. rainmotorsports

    rainmotorsports Well-Known Member

    Can I ask what the url is? If not and either way you hit the button to scrape new data not the cached data right?
     
  9. Okenyon

    Okenyon Active Member

  10. rainmotorsports

    rainmotorsports Well-Known Member

    I am not seeing the meta tags for opengraph in what the scraper is returning. Like something is missing from your template perhaps.

    It appears open_graph_meta is the template for this. I see it is inserted via the following templates
    forum_list
    forum_view
    member_view
    pagenode_container
    thread_view

    The main page is forum_view I believe (unless its not lol) I would check it and see if it has this in it:
    Code:
    <xen:container var="$head.openGraph"><xen:include template="open_graph_meta">
        <xen:set var="$url">{xen:link 'canonical:forums', $forum}</xen:set>
        <xen:set var="$title">{$forum.title}</xen:set>
        <xen:set var="$description">{xen:helper stripHtml, {xen:raw $forum.description}}</xen:set>
    </xen:include></xen:container>
     
  11. Okenyon

    Okenyon Active Member

    The code above is within my forum_view template if that is what you are asking?

    We just migrated from vb so maybe its a cache issue?
     
  12. rainmotorsports

    rainmotorsports Well-Known Member

    Doubt it. The page source lacks the tags, thats live. When you view the html source of your site you should be seeing tags like <meta property="og:image"

    Our page for example:
    Something is causing these to not appear. You might need a bit more help than I can give at the moment. But I would assume there is something missing from one template or another. Did you check the open_graph_meta template to see if it had anything in it as well?
     
  13. Mike

    Mike XenForo Developer Staff Member

    The open graph tags are only output if you enter an app ID or one or more Facebook admin user IDs. (This was changed in the past due to errors that FB threw; I'd have to check if that's still the behavior.)
     
    rainmotorsports likes this.
  14. Okenyon

    Okenyon Active Member

    Nice suggestion @Mike where do I enter these?
     
  15. Mike

    Mike XenForo Developer Staff Member

    Use these ACP search for "Facebook" -- the top few options are the ones in question.
     
  16. Okenyon

    Okenyon Active Member

    @Mike added Facebook admin ID and worked like a charm! Thank you all very much!
     

Share This Page