Fix Facebook Like



Facebook Like many times gives problems like wrong thumbnail (og:image), wrong title (og:site_name), wrong description (og:description), etc. This plugin fixes them, as it enforces WordPress post thumbnail for image if a post is liked, or your website’s logo if home page is liked, post title if post is liked or blog title if home page is liked, it also uses excerpts for description(optional) or blog tagline if home page is liked. In addition to these, it also gives the option to add your website type and admins of your website.

You can use Facebook’s URL Linter to verify the settings.

NOTE: This plugin doesn’t adds a Facebook Like button, but gives options/settings for it. There are many plugins to add Facebook Like buttons to your website, you can check them out.

It uses Open Graph protocol from Facebook for fixing these.

You can customize these in the Settings section:

  • Using post excerpt for description text.
  • Type of website (og:type).
  • Website’s logo (og:image for Homepage).
  • Admin Facebook IDs (fb:admins).

Installation

  • Download the latest version.
  • Extract it in the /wp-content/plugins/ directory.
  • Activate the plugin through the ‘Plugins’ menu in WordPress.
  • Customize the plugin in the Settings > Fix Facebook Like.

Adding your Facebook ID to the Settings will allow you to manage your Fans faster and send them updates.

Frequently Asked Questions

Do I need to provide my Facebook ID?
No, its optional, it will still work fine.

How to get my Facebook ID?
You need your numerical Facebook ID.
To get your profile ID, click on your Facebook profile and look at the URL, it should resemble this: http://www.facebook.com/profile.php?id=123456789 where 123456789 is your Facebook user ID.
If you have a username, lookup your user ID with this URL: http://graph.facebook.com/username.

Screenshots(Click for larger image)

The Settings menu in the admin panel for customization.

99 Responses to “Fix Facebook Like”

  1. Kahil June 21, 2011 at 4:01 am #

    Is there a way to fix header issues with this plugin?  As in the header already sent error? 

  2. Pritesh Gupta June 21, 2011 at 1:39 pm #

    Hi Kahil, 
    Which version are you using? It was fixed since version 1.2.0.
    Anyways, remove the plugin, and then do a clean install of it.
    If the problem still persists, contact me via the contact form at http://www.priteshgupta.com/contact/

  3. Kahil June 21, 2011 at 3:18 pm #

    I’m using the most current version on WordPress.org.  Just installed it for the first time yesterday.

    I was getting the error constantly when I had wp-super cache activated.  

    Now I get only this error and I can’t even get into my admin section now.

    Warning: Cannot modify header information – headers already sent by (output started at /home/content/k/a/h/kahil/html/wp-content/plugins/fix-facebook-like/fix_facebook_like.php:29) in/home/content/k/a/h/kahil/html/wp-includes/pluggable.php on line 897

  4. Kahil June 21, 2011 at 3:23 pm #

    I deleted the plugin and installed it again.  I again get this lil message right after installing:

    The plugin generated 2 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.

  5. Guest June 21, 2011 at 4:29 pm #

    After a brief interaction with Pritesh, I would caution you to stay away from him and this plugin.

  6. Pritesh Gupta June 21, 2011 at 7:02 pm #

    Hi Kahil, 

    I get you, my bad, I have fixed it, it will be in Version 1.2.1.WordPress SVN is down right now, I will upload it as soon as it is up.

    Meanwhile, delete the plugin entirely, either by using WordPress Dashboard or FTP, and download the new version(whenever WordPress’ fixes their SVN)

    Or you can download it from http://files.priteshgupta.com/plugins/fix-facebook-like.1.2.1.zip

  7. Mauricio Huayta June 22, 2011 at 1:56 pm #

    Los estoy Probando, Gracias
    Mauricio Huayta
    Creador de: http://dominaphotoshopgarantizado.com/blog

  8. e-commerce June 23, 2011 at 11:50 am #

    Hello,

    i have a problem with the plugin, in post page the og:image say empty.
    any idee to help me fix that ?

    best regards

  9. Pritesh Gupta June 24, 2011 at 3:56 am #

    Hi, 
    Make sure you have Post Thumbnails for posts, then only you will see something in og:image.

  10. Texas11 June 29, 2011 at 7:00 pm #

    I’ve done this, but still no og:image. Could it be the Plugin I’m using for the Like button? I’ve tried several, but no luck. Can you recommend a Like Button plugin?

  11. Pritesh Gupta June 30, 2011 at 4:18 am #

    Yes, its that. You should try using a simple like plugin, or make sure your current plugin is not handling og:image. After doing these, you can check your settings at http://developers.facebook.com/tools/lint/

  12. Bogdan Besliu July 6, 2011 at 3:34 pm #

    Hi, I have a problem with the like button. Using or not using your plugin is the same. It keeps going back to 0. If you push like it counts for 1 second then goes back to 0. Any ideas?

  13. Pritesh Gupta July 6, 2011 at 3:47 pm #

    Try disabling all the Like plugins, and removing them. Then use any simple like button, with this plugin.

  14. Ryan Isra July 12, 2011 at 2:06 pm #

     There must be a script conflict on your blog. Try use iframe on other “facebook script”, and  XFBML on the other one…

  15. Ryan Isra July 12, 2011 at 2:06 pm #

     There must be a script conflict on your blog. Try use iframe on other “facebook script”, and  XFBML on the other one…

  16. Michael72688 July 12, 2011 at 11:37 pm #

    Anyone know how to use this?  I have no programming experience.  I downloaded and installed the plugin.  Now what?

  17. Pritesh Gupta July 13, 2011 at 4:53 am #

    Go to Settings >> Fix Facebook Like, it does most of the work itself though. 

  18. NCL July 14, 2011 at 8:06 pm #

    I’m getting a fatal error when trying to activate the plugin. Thoughts?

    Fatal error: Cannot redeclare addheadercode() (previously
    declared in
    /home/necoli/public_html/wp-content/plugins/social-links/sociallinks.php:316)
    in /home/necoli/public_html/wp-content/plugins/fix-facebook-like/fix_facebook_like.php on line 216

  19. Pritesh Gupta July 15, 2011 at 8:27 am #

    The social links plugin is causing a problem because of poor programming in it,

    May be this is the cause, you should try deactivating it. 

  20. Draven July 15, 2011 at 10:58 am #

    First, great plugin that I use for a while! Thank you! :)Unfortunately, with WordPress version 3.2 it is no longer possible to use the post preview, the plugin appears to cause an error, if it sets the meta tags. Is there a way to correct this error?

  21. Pritesh Gupta July 15, 2011 at 11:01 am #

    Hi Draven, 
    This thing works absolutely fine with 3.2, and what do you mean by post preview?Please elaborate.

  22. Draven July 15, 2011 at 11:08 am #

    That’s right! It works fine with WordPress 3.2, but if you write an article and trying to watch the preview, it cancels the rendering  of the preview when generating the meta tags. Unfortunately, no error message, but in the html source code of the preview the last entry is <meta property="og:url"

  23. Pritesh Gupta July 15, 2011 at 12:56 pm #

    Haha, this will work only after the article has been published, why do you expect the php to generate the meta tags for preview? 

    Sounds no sense to me.

  24. Draven July 15, 2011 at 1:02 pm #

    I know that the meta tags only take effect only at the published page! And why your script insert the meta tags also in de preview?

  25. Pritesh Gupta July 15, 2011 at 1:03 pm #

    The meta tags will be there of course, but actual/real/correct value will only be there once the post is published. 

  26. Draven July 15, 2011 at 1:04 pm #

    And exactly this is the problem and cancels the rendering  of the preview……..

  27. Pritesh Gupta July 15, 2011 at 1:08 pm #

    Well, I don’t get you… :-

    You can’t expect the meta tags to “render”.Please talk sense. You seriously need to preview meta tags? huh? This is a fairly basic plugin, and outcomes are pretty much obvious. 

  28. Draven July 15, 2011 at 1:14 pm #

    Sorry for my bad english…

    The browser renders the page and it have a problem with the inserted meta tags from your plugin, take a look at your own preview, it cancel the rendering at html source code 

  29. Draven July 15, 2011 at 1:23 pm #

    A little if ( is_preview() ) { would solve the problem….

  30. Pritesh Gupta July 15, 2011 at 1:52 pm #

    Umm, you are the only one having this problem, this seems a problem with your theme’s functions.php. Cause I just checked, it works absolutely fine with even in preview.

    Anyways, I have fixed it, look out for v1.2.4. :-)
    No more of those Meta Tags in previews.

  31. Draven July 15, 2011 at 2:05 pm #

    Hmmm, with my functions.php? Could you explain?

    Thank you very much for the new version of your plugin :)

  32. Draven July 15, 2011 at 2:07 pm #

    Perhaps only Google Chrome has the problem?

  33. Anonymous July 19, 2011 at 2:47 pm #

    hei..
    i’m using the plugin, but, i don’t know how to use it, properly..haha

  34. Gooderpoker July 20, 2011 at 2:34 am #

    I installed the plugin and entered in my settings but it is not showing anywhere on my site; nflbettingpicks.com

  35. Pritesh Gupta July 20, 2011 at 4:22 am #

    This plugin just adds some meta tags, so that next time whenever someone likes your content, his/her fb profile will show correct data. You need to configure a little from the settings menu of this plugin.

  36. Pritesh Gupta July 20, 2011 at 4:23 am #

    It will show in the source code.

  37. Ketchub July 24, 2011 at 10:49 pm #

    Big thanks for your effort bro!

     I’m Always getting the following image in Facebook LIKE posts:

    http://imageshack.us/photo/my-images/714/safeimagephpdaqbxnlgpyj.jpg

    Although my posts have thumbnails and my Facebook page has its own image and also I have setup your plugin for default image but still I’m getting the above image example!

    Very strange behavior, I have only 1 post that is showing post image in Facebook LIKE post! Although this post has no thumbnail setup!

    Thanks in advance for your help ;)

  38. Pritesh Gupta July 25, 2011 at 4:10 am #

    Try deactivating rest of the Facebook Like plugins.

  39. Arthur July 26, 2011 at 4:04 pm #

    In WordPress 3.2.1 your plugin causes an empty iframe to render before the body content. It starts with this: iframe id=”a2apage_sm_ifr”

    That causes about a 6-7 pixel empty bar across the top of the page, but only on “posts”, not pages.

    ???

  40. Pritesh Gupta July 26, 2011 at 6:21 pm #

    Haha,
    Its not my plugin, some other plugin is causing it. Try deactivating
    some plugins.

  41. April July 27, 2011 at 7:36 pm #

    I followed the above instructions when it comes to your plugin, however whenever it is activated and someone tries to click the like button it doesn’t work and says “error” see picture attached. 

    I tried with a number of different Facebook like plugins and got the same results. 

  42. April July 27, 2011 at 7:36 pm #

    I followed the above instructions when it comes to your plugin, however whenever it is activated and someone tries to click the like button it doesn’t work and says “error” see picture attached. 

    I tried with a number of different Facebook like plugins and got the same results. 

  43. Christina Majaski August 2, 2011 at 2:50 am #

    I may be doing something wrong but the posts are still sharing on FB with all of the messed up code. http://www.solitarymama.com. It doesn’t matter which like button I use they all show up crazy and with thumbnails of images in my sidebar.

  44. Fannar August 2, 2011 at 9:32 am #

    thanks for your great plugin. I’m having one problem though, when I create a post in WordPress without a thumbnail I get an error on my like box saying that there is no  meta property=”og:image”  present. I realize that if there is no image present that your plugin will not generate the og:image meta data, but is there a way to have it use a default image when no thumbnail is present? otherwise I always get errors on posts that don’t have images.

  45. Pritesh Gupta August 2, 2011 at 12:01 pm #

    The Button still work fine, 
    and if you dont wanna use the WP Post Thumbnail, simply delete the associated codes of line from the plugin’s php file. 

  46. Pritesh Gupta August 2, 2011 at 12:01 pm #

    The Button still work fine, 
    and if you dont wanna use the WP Post Thumbnail, simply delete the associated codes of line from the plugin’s php file. 

  47. Fannar August 2, 2011 at 4:08 pm #

    On the posts that don’t have any images the meta tag for images turns up empty like so:  and when I press the like button I get an error because of this. But on the posts that have WP Post Thumbnails it works well. I would like to have both posts with WP Post Thumbnail and without them.

  48. Pritesh Gupta August 2, 2011 at 4:12 pm #

    I will add this in a future version using a simple conditional. :-)  
    Though everything is gonna still work fine I suppose .

  49. Fannar August 2, 2011 at 4:58 pm #

    I managed to fix the problem, it was a combination of adding this to the plugin

    <meta property="og:image" content="”/>and then the iframe code for the like button had gone crazy as well.

  50. Ryan Isra August 5, 2011 at 11:41 pm #

    I just realized my adsense script doesn’t show up for a week.
    Then I found out that your “Fix Facebook Like” plugin causing the Quick Adsense stopped displaying ads.

Trackbacks/Pingbacks

  1. Fix Facebook Like Using WordPress Plugin | PriteshGupta.com - June 17, 2011

    [...] logo if home page is liked and a lot more, you can visit the plugin’s release page at http://www.priteshgupta.com/plugins/fix-fblike, or download it from WordPress.org at [...]

  2. Great Plugin To Fix Facebook Like Problems | Best WordPress Plugins - June 17, 2011

    [...] for description (text displayed on user profiles who like your page) plus a couple more options. You can download the plugin here.Note: This WordPress Plugin does not add a Facebook like button to your posts or pages. There are [...]

  3. Pritesh Gupta på "Fix Facebook Like" - CyberMaster - June 17, 2011

    [...] Fix Facebook Ligesom Plugin hjemmeside for mere [...]

  4. Great Plugin To Fix Facebook Like Problems | WordPress How To - June 18, 2011

    [...] It ensures correct the title with the WordPress thumbnail as the shown image when your post is liked. You can even use excerpts for description (text displayed on user profiles who like your page) plus a couple more options. You can download the plugin here. [...]

  5. Fix Facebook Like Plugin for WordPress | | Scripts UnitedScripts United - June 18, 2011

    [...] für WordPressFix Facebook Like Plugin for WordPressPubliziert 18. Juni 2011 | Von khkDas Plugin Fix Facebook Like for WordPress von Pritesh Gupta sorgt dafür, dass bei einem Like das richtige Bild, der [...]

  6. Fix Facebook Like Plugin for WordPress - June 18, 2011

    [...] Facebook Like Plugin for WordPress 18. Juni 2011 | Autor: KHK Pritesh Gupta Plugin Fix Facebook Like for WordPress sorgt dafür, dass bei einem Like das richtige Bild, der richtige Sitename und [...]

  7. Fix Facebook Like Plugin for WordPress - June 18, 2011

    [...] Facebook Like Plugin for WordPress 18. Juni 2011 | Autor: KHK Pritesh Gupta WordPress Plugin Fix Facebook Like bewirkt, dass bei einem Klick auf das Like Button das richtige Bild, der richtige Sitename und die [...]

  8. WordPress Plugin: Fix Facebook Like | Blog Toolbox - June 18, 2011

    [...] Plugin: Fix Facebook LikePubliziert 18. Juni 2011 | Von khk Pritesh Guptas WordPress Plugin Fix Facebook Like bewirkt, dass bei einem Klick auf das Like Button das richtige Bild, der richtige Sitename und die [...]

  9. lists steps to avoid problems sharing blog posts on Facebook « I*net Systems - April 14, 2012

    [...] the many plugins that insert OG metainformation into your single post pages. I am currently using Fix Facebook Like which is straightforward to configure and seems to include all necessary OG tags.2) Make sure all [...]

Leave a Reply