Fixed Facebook AppId required for opengraph meta tags?

Jake B.

Well-known member
I've just noticed that it looks like the facebook App ID is required to display the opengraph meta tags on your pages, which (at least from what I know about it) is a bit odd since these tags are used by twitter and many other sites to generate 'cards' of sorts when you post a link.

Relevant code:
Code:
<xen:if is="{$xenOptions.facebookAppId} OR {$xenOptions.facebookAdmins}">
    <meta property="og:site_name" content="{$xenOptions.boardTitle}" />
    <xen:if is="{$avatar}"><meta property="og:image" content="{$avatar}" /></xen:if>
    <meta property="og:image" content="{xen:helper fullurl, @ogLogoPath, 1}" />
    <meta property="og:type" content="{xen:if $ogType, $ogType, article}" />
    <meta property="og:url" content="{xen:raw $url}" />
    <meta property="og:title" content="{xen:raw $title}" />
    <xen:if is="{$description}"><meta property="og:description" content="{xen:raw $description}" /></xen:if>
    {xen:raw $ogExtraHtml}
    <xen:if is="{$xenOptions.facebookAppId}"><meta property="fb:app_id" content="{$xenOptions.facebookAppId}" /></xen:if>
    <xen:if is="{$xenOptions.facebookAdmins}"><meta property="fb:admins" content="{xen:helper implode, {$xenOptions.facebookAdmins}, ','}" /></xen:if>
</xen:if>

The only parts of this that actually requires facebook are:
Code:
    <xen:if is="{$xenOptions.facebookAppId}"><meta property="fb:app_id" content="{$xenOptions.facebookAppId}" /></xen:if>
    <xen:if is="{$xenOptions.facebookAdmins}"><meta property="fb:admins" content="{xen:helper implode, {$xenOptions.facebookAdmins}, ','}" /></xen:if>

Which has me kind of wondering ift his was intentional, and if so what the reason behind this would be :)
 
Last edited:
At one point, based on the OG debugger, I think the lack of an admins or app ID tag was an actual error. Now it appears to be a warning:
fb:admins and fb:app_id tags are missing. These tags are necessary for Facebook to render a News Feed story that generates a high click-through rate.
As such, I'll remove the wrapping if.
 
Top Bottom