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

Fixed Facebook AppId required for opengraph meta tags?

Discussion in 'Resolved Bug Reports' started by Jake B., Dec 7, 2015.

  1. Jake B.

    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: Dec 7, 2015
    Liam W likes this.
  2. Mike

    Mike XenForo Developer Staff Member

    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:
    As such, I'll remove the wrapping if.
     
    Jake B. likes this.
  3. Muhtefi

    Muhtefi Member

    as of which version is this resolved?
     
  4. Chris D

    Chris D XenForo Developer Staff Member

    The version after we posted to say it was fixed, 1.5.5(a).
     
    Muhtefi likes this.
  5. Muhtefi

    Muhtefi Member

    thanks
     

Share This Page