Configure an image for facebook to use on shared posts

Discussion in 'Webmaster News' started by Rob, Jul 25, 2012.

  1. Rob Administrator

    Founder
    Money:
    $444
    It's great when threads/posts from your site get shared on facebook - but it's a little disconcerting when facebook chooses some other image on the shared page as the icon instead of your cool logo!

    I recently had this issue with my Linux news site (LinuxNews.co). Luckily you can easily mark your pages with an image tag which will tell facebook which image to use when linking to your site. Here's how I did it.

    Here's what I started with
    Facebook was grabbing the technorati.com image from the 'share this' section of the page...
    View attachment 65

    Fix the problem by telling facebook where to grab your logo(s)
    To fix this, add a line like this within the <head> </head> tags on your site:
    HTML:
    <link rel=”image_src” href=”http://www.linuxnews.co/images/fb-logo.png” / >
    Some people put 3-5 links like that so facebook has some different ones to choose from. I just went with the one since I was too lazy to make up different logo files. So - yours may look like this:
    HTML:
    <link rel=”image_src” href=”http://www.linuxnews.co/images/fb-logo1.png” / >
    <link rel=”image_src” href=”http://www.linuxnews.co/images/fb-logo2.png” / >
    <link rel=”image_src” href=”http://www.linuxnews.co/images/fb-logo3.png” / >
    <link rel=”image_src” href=”http://www.linuxnews.co/images/fb-logo4.png” / >
    You're not finished yet
    You want to clear facebook's cache of your image now - otherwise you won't see the change probably for days. To do this, visit the facebook developer tools debugger page and paste in a URL to your site:
    Facebook URL Debugger

    You should see something like this after you input your URL:

    View attachment 66

    Ok, so now you're done
    The next time someone shares a post from your site on facebook, it will have the correct image icon and you'll end up with better branding and recognition. Here's what we ended up with on our Linux news project:
    View attachment 67

    Good luck - reply to this thread if this helped you out - or if you need help setting yours up!

    By the way, if you're into Linux.. like our Linux News Facebook page please!

    Attached Files:

    MyDigitalpoint likes this.
  2. MyDigitalpoint Member

    Money:
    $239
    Excellent idea and solution Rob!

    I sometimes need to post a link to my personal site on Facebook and it does not even find a picture to show off, basically because my main page is actually a great looking background with a login form, I guess.

    But I just did a test with your suggestion and it works like a charm!

    Thanks for sharing this :)
  3. Rob Administrator

    Founder
    Money:
    $444
  4. theafterhours Member

    Money:
    $46
    Thanks Rob. I have a similar problem as digitalpoint, my home page is actually just a login page which doesn't exactly appeal to Facebook users. Thanks for the solution Rob. :)
  5. *you're Member

    Money:
    $286
    Thanks, this is truly helpful. I hate it when Facebook chooses random images in my site when I 'like' something on it.

    I'll bookmark this tut and get started later :)

Share This Page