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

FB pulling wrong logo-image

Discussion in 'XenForo Questions and Support' started by erich37, Feb 23, 2012.

  1. erich37

    erich37 Well-Known Member

    I just made a post at FB and entered the URL of my website into this FB-comment.

    Unfortunately FB is pulling a wrong logo-image for my website.

    This was actually working fine when I had "FB Connect" activated for my website, but since I have FB-Connect deactivated, it seems FB is pulling the wrong image for my website.

    Where is FB pulling this image from and how can I change it ?

    Many thanks!
  2. Brogan

    Brogan XenForo Moderator Staff Member

    How do I replace the Xenforo Facebook recommend/like logo with my own?
    Upload your logo to the server and change the image path in the ACP -> Styles -> Style Properties -> Header and Navigation -> Settings: Facebook Open Graph Logo. Due to caching it can take several weeks for the image to update on the Facebook servers.

  3. erich37

    erich37 Well-Known Member

    Hi Brogan,

    yeah, this I know.
    It was working fine previously and I have not changed the image since half a year.
  4. erich37

    erich37 Well-Known Member

    I have checked again the logo at my server. It is the correct logo since October last year and has never been changed.

    Checking the FB URL and the image it is showing, you can see that FB is not pulling the "logo.og.png" image, but FB is pulling an Avatar-image (including the Avatar-ID) from my website.

    Strange: why would FB pull an Avatar-image if I post the URL of my website into a FB-post ?
  5. erich37

    erich37 Well-Known Member

    O.K. now I see what is happening, which makes me even more confused:

    when I type the URL of my website into a FB-comment-box, then it shows a different image, depending of whether I write the URL-address with capital letters or small letters:

    when I type the URL of my website with having the very first letter in capital character, then it shows the correct "logo.og.png" image.

    when I type the URL with having the very first letter in lower case character, then it shows the wrong image for my website, literally showing an image of a User-avatar.

    Facebook is getting even more scary as it already is...........:eek:
    Now I am considering of deleting my FB-Page and also my FB user-account.......
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Maybe some kind of caching? Dunno.

    The avatar of the author is used on thread pages. You can see it in the <head> area of the source code of the page.
  7. erich37

    erich37 Well-Known Member

    Sorry, I do not understand what you mean by that....?
  8. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    View the source code of this thread:

    	<meta property="og:site_name" content="XenForo Community" />
    	<meta property="og:image" content="http://xenforo.com/community/data/avatars/m/0/764.jpg?1327975937" />
    	<meta property="og:image" content="http://xenforo.com/community/styles/default/xenforo/logo.og.png" />
    	<meta property="og:type" content="article" />
    	<meta property="og:url" content="http://xenforo.com/community/threads/fb-pulling-wrong-logo-image.28310/" />
    	<meta property="og:title" content="FB pulling wrong logo-image" />
    	<meta property="fb:app_id" content="146201428725181" />
    Your avatar is used an the og:image.
  9. erich37

    erich37 Well-Known Member

    you are correct.

    <meta property="og:image" content="http://xenforo.com/community/data/avatars/m/0/764.jpg?1327975937" />
    this is exactly the Avatar-image which FB is pulling instead of the "logo.og.png" image.

    So is this a bug in XF or a bug at FB ?
  10. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    It's not a bug. It's a feature. Thread pages send two og images, the default image and the avatar of the thread author. If you don't want the avatar to be used then you can edit this template:

    Admin CP -> Appearance -> Templates -> thread_view

    Remove the red code:

    <xen:container var="$head.openGraph"><xen:include template="open_graph_meta">
    		<xen:set var="$url">{xen:link 'canonical:threads', $thread}</xen:set>
    		<xen:set var="$title">{xen:helper threadPrefix, $thread, escaped}{$thread.title}</xen:set>
    		<xen:set var="$avatar">{xen:helper avatar, $thread, m, 0, 1}</xen:set>
    fredrikse likes this.
  11. erich37

    erich37 Well-Known Member

    well, the thing is that I did not enter a "Thread-URL" into the Comment-box at Facebook.
    I just entered my normal main URL as a Comment at some FB-page, and then it turned-up this user-avatar-image instead of the "logo.og.png" image.

    So I thing somewhere is a bug, as it should not be the case that it shows up some user-avatar-image insted of the main Forum-Logo-og....... when entering just the normal main URL of my XF-website.

    Even in the past it was working properly:
    when I submitted a Thread from my Forum into some FB-page, then it showed-up the main "logo.og.png"-image, and not some user-avatar.... but now something has changed??
  12. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    What is the URL? Check the source code of the page. Look at the og information in the <head> to see what is defined for the og:image. If the image you see doesn't match the one that is defined in the source then it must be cached.
    erich37 likes this.
  13. erich37

    erich37 Well-Known Member

    I just send you a PC.
    Would be great if you could have a quick look ?

    Many thanks!
  14. erich37

    erich37 Well-Known Member

    as per Jake's check, it appears that the "Facebook-Connect" (Login via Facebook) is required in order to make the "logo.og.png"-image to appear, instead of having some Avatar-image appear.

    I think this is a design flaw either by XF or Facebook.

    I should not be the case that FB shows any user-avatars when somebody enters my Website-URL into a FB-comment-box. That will literally diminish the privacy of my members.....when Facebook shows their user-avatar insted of my Forum-logo (og-image).

    So it seems we have to use "FB-Connect" in order to show the "logo.og.png"-image when making a post at Facebook.

    But in my case, I do not want to use "FB-Connect".
  15. Kay

    Kay Member

    Thanks for posting this @Erich37. I am having the same problem where fb is pulling random images including images in posts and user profile pics whenever a anyone 'likes' my site. I did not initially have fb connect and this was an issue for me. I have now installed fb connect hoping this will correct the issue. As I have to wait for caching by fb, images are still be pulled from the wrong place. I know this was an issue 6 months ago for you, since then, was there anything else you found that helped correct this problem?

    Thanks in advance.
  16. Chris D

    Chris D XenForo Developer Staff Member

    You can edit the path to the image and the filename in Style Properties.

    (Easiest way to find it is search for oglogopath in Admin CP, one of the results should be a Style Property).

    I would create a new image, upload it to the same path if you like but give it a different file name. This should force Facebook to grab the new image.
  17. Kay

    Kay Member

    Ok thanks, I think you are talking about this:

    Open your Admin Panel go to Appearance > Styles > Select Style Properties next to your style name > Header and Navigation > Change Facebook Open Graph Logo to your liking.

    If you are, I have done this and changed the Facebook Open Graph image to an image with my site name by uploading an image to the server (I did this more than 6 weeks ago). Still I have this random pulling of images by fb. Unless I'm missing something...
  18. Chris D

    Chris D XenForo Developer Staff Member

    Yeah that's what I'm talking about.

    Damn. Facebook's caching sucks.

    The weird thing as well, is that you'll find if you ask other people they'll tell you they can see the right image. So it is a bit sporadic.

    I think eventually it will sort itself out.
  19. Kay

    Kay Member

    Hmmm, just looked at the file name in the server, the file name seems unchanged but when I click on the image, the image is my site name. I'll try changing the name and see if that corrects it.
  20. Bram

    Bram Well-Known Member

    I would like FB to grab the first image of an attachment (guests can view these) instead of this logo.og.png or an avatar when content gets shared on Facebook.

    Basically a first post image, as happens with Wordpress for example.

    Is that possible too?

Share This Page