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

FB Share image on a site

Discussion in 'XenForo Questions and Support' started by Kim, Jun 5, 2011.

  1. Kim

    Kim Well-Known Member

    Hi all,

    I have no idea if this is a support issue, or just a general question, so feel free to move if necessary.

    On one of my clients sites, the image that comes up when he shares the link in Facebook is an Advertisment from his forum.. nothing to do with the actual clients site at all.

    Is there any possible thing that can be done to change this image? Is it indeed anything to do with Xenforo...

    Any help or advice is appreciated :)

  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member



  3. Kim

    Kim Well-Known Member

    erm... no I don't think so.. but then I know nothing about FB.

    His site is showing one of the ADs from his site as the Facebook thumbnail when he shares the link on Facebook.


    He sends someone a message on Facebook, with a link to his site... the link gets converted into a preview image thing with a description.. the image that is showing is an Advertisment that he has on his site for another site.

  4. Kier

    Kier XenForo Developer Staff Member

    What happened to the contents of the open_graph_meta template? He has Like buttons on there, but no <meta content="og: ... " /> tags, which is going to cause problems. Perhaps the template was removed or altered as part of the style customization?

  5. Peggy

    Peggy Well-Known Member

    Kim are you talking about the logo.og.png not being used?
    Mine does the same thing when I share a thread on my site. I can't get FB to use the logo.og.png image.
  6. Kier

    Kier XenForo Developer Staff Member

  7. Kier

    Kier XenForo Developer Staff Member

    Update - Peggy, your problem is limited to your homepage, if you check the linter for http://mahoningvalleytalk.com/forum/ you'll see that it has the correct meta tags.

    To fix the problem, you need to edit the template for your homepage and add the following code:
    <xen:container var="$head.openGraph"><xen:include template="open_graph_meta" /></xen:container>
    That should resolve your issues.
  8. Kim

    Kim Well-Known Member

    Not that I am aware of, it is certainly not something I have changed or edited at all.

    The style is showing no out of date templates.
  9. Peggy

    Peggy Well-Known Member

    Kier I've had this issue long before I added the portal to my site. Brogan and I have posted back and forth about it before.
    But I'll give this a try and see if it works. Thanks.
  10. Kier

    Kier XenForo Developer Staff Member

    Difficult to debug the problem from the outside. Send me an admin login and I'll take a look.
  11. Kim

    Kim Well-Known Member

    Okies :)
  12. Kim

    Kim Well-Known Member

    Not sure if I am talking about that or something else sorry Peggy.
  13. Peggy

    Peggy Well-Known Member

    I'm pretty sure it is because what you're pointing to is where the logo.og.png image appears.
  14. Kier

    Kier XenForo Developer Staff Member

    It's because the site has no Facebook app ID or admins specified.
    Kim likes this.
  15. Kim

    Kim Well-Known Member

    Thanks for your help Kier.. interesting to know, and one for my knowledge base.. input Faceborg ID before sending out links on FB.

    Peggy likes this.
  16. Peggy

    Peggy Well-Known Member

    Kier, I added that code here - I hope this was the correct place to add it? :)

    <xen:container var="$head.canonical"><link rel="canonical" href="{xen:link 'canonical:portal'}" /></xen:container>
    <xen:container var="$head.description"><meta name="description" content="{$xenOptions.boardDescription}" /></xen:container>
    <xen:container var="$quickNavSelected">portal</xen:container>
    [B]<xen:container var="$head.openGraph"><xen:include template="open_graph_meta" /></xen:container>[/B]
    <xen:require css="EWRporta.css" />
    <xen:if is="{$xenOptions.EWRporta_breakout}"><xen:require css="EWRporta_BreakOut.css" /></xen:if>
    <xen:if is="{$blocks.top}">
    <div class="sidebar topBlocks">
        <xen:foreach loop="$blocks.top" value="$block">
            {xen:raw $block}
  17. Kier

    Kier XenForo Developer Staff Member

    Should be okay, have you tried running it through the linter?
  18. Peggy

    Peggy Well-Known Member

    ugh I did, and these properties are still missing -

    Required Property Missing og:title is required
    Required Property Missing og:url is required
  19. Kier

    Kier XenForo Developer Staff Member

    Okay, try this instead:
    <xen:container var="$head.openGraph"><xen:include template="open_graph_meta">
    <xen:set var="$title">{$xenOptions.boardTitle}</xen:set>
    <xen:set var="$url">{$xenOptions.homePageUrl}</xen:set>
  20. Kier

    Kier XenForo Developer Staff Member

    Kim - this describes the problem on PegasusForum:


    Note: this requirement for FBAdmins or AppID is a relatively new requirement from Facebook, and was not the case during the early XenForo betas.
    Kim likes this.

Share This Page