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

XF 1.4 Odd Facebook og issue?

Discussion in 'XenForo Questions and Support' started by Okenyon, Nov 5, 2014.

  1. Okenyon

    Okenyon Active Member

    Guys I had it working fine and then all of a sudden the scraped info on the debugger pulls from

    http://www.entrepreneurfix.com/dev/

    https://developers.facebook.com/tools/debug/og/object/

    Board URL etc is all http://entrepreneurfix.com/

    and og template and app ID is correct,

    Code:
    <xen:if is="{$xenOptions.facebookAppId} OR {$xenOptions.facebookAdmins}">
        <meta property="og:site_name" content="Entrepreneur Forum | EntrepreneurFix" />
        <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="http://entrepreneurfix.com" />
        <meta property="og:title" content="Entrepreneur Forum | EntrepreneurFix" />
        <xen:if is="{$description}"><meta property="og:description" content="The number one Entrepreneur and Business forum online." /></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>
     
  2. Mike

    Mike XenForo Developer Staff Member

    What's being output doesn't seem to match 100% with what's there -- notably, the og:title line. That said, you likely shouldn't be customizing the OG information block like that. The URL and title are passed in, for example.
     
  3. Okenyon

    Okenyon Active Member

    @Mike

    Reverted back to

    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, {xen:property 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>
    and still facing same results.

    I can't seem to work out where /dev would be called?
     
  4. Okenyon

    Okenyon Active Member

    Seems like its pulling /dev from the "Canonical URL"

    Really unsure as to where this may be referenced? @Mike
     
  5. Mike

    Mike XenForo Developer Staff Member

    I still see some broken code, but I don't see the dev component, so this appears to be fixed now. What was it?
     
  6. Okenyon

    Okenyon Active Member

    @Mike I hold my head in shame - ran forums for over 10 years, edited the wrong style :(

    *goes back to bed!
     

Share This Page