• 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.

Okenyon

Active member
#3
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
 

rainmotorsports

Well-known member
#4
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:
<meta property="og:site_name" content="TBGclan.com | True Born Gaming">

<meta property="og:image" content="http://www.tbgclan.com/styles/default/xenforo/logo.og.png">
<meta property="og:type" content="article">
<meta property="og:url" content="http://www.tbgclan.com/">
<meta property="og:title" content="TBGclan.com | True Born Gaming">
 

Okenyon

Active member
#7
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.
 

rainmotorsports

Well-known member
#10
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>
 

Okenyon

Active member
#11
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?
 

rainmotorsports

Well-known member
#12
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?
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:
<meta property="og:site_name" content="TBGclan.com | True Born Gaming">

<meta property="og:image" content="http://www.tbgclan.com/styles/default/xenforo/logo.og.png">
<meta property="og:type" content="article">
<meta property="og:url" content="http://www.tbgclan.com/">
<meta property="og:title" content="TBGclan.com | True Born Gaming">
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?
 

Mike

XenForo developer
Staff member
#13
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.)