Creating a Wordpress plugin: Add the new Facebook Like button to your posts

——————
Note: Here is the latest version of the Facebook Like Wordpress Plugin for the impatient (and people not interested in the technical details but just looking for a solution working out of the box).

There is also the Official Wordpress page (from which you should rate the plugin and report it works, thanks).

This blog post is about the process of creating the plugin itself, so if you use the plugin directly you don’t have anything else to do than just installing it.
No coding necessary.
Otherwise you would add things manually and then the plugin would do the same again.
Jump to section 7/ Installation of the plugin if you just want to use the final product working out of the box.
Check also section 8/ Customize the plugin for help on configuring it when installed.
——————

Writing a Wordpress plugin is fairly simple provided you know PHP and follow the well documented process at wordpress.org.

If you’re in a hurry and just want a simple functionality, this guide is what you need.

Here’s a shortened version on how to create a Wordpress plugin that will add the new Facebook “Like” button announced yesterday at f8 to your posts and/or pages.

Facebook new Like button

Simple yet customizable as we’ll still provide a settings page for the plugin.

Facebook new Like button Wordpress plugin settings

1/ Optional Preparation

You can write a plugin and release it without submitting it to the official Wordpress directory.

Submitting your plugin to the Wordpress directory means your plugin must be release under GPLv2, so be aware of that before hand if it bothers you.

Some benefits of submitting to the directory are:
- faster distribution (users can find it easily)
- free SVN hosting
- packaging of the different versions
- access to analytics (number of downloads, …)

If you intend to submit your plugin to the directory, it may be a good idea to first look up which names are available as you may want to name your files and functions according to this name.
Check out the Wordpress plugin SVN to see what’s already taken.

2/ Create the plugin folder

bash# cd ~/wordpress/wp-content/plugins/
bash# mkdir like
bash# cd like/
bash# touch readme.txt
bash# touch tt_like_widget.php

We really need only two files:
- the readme file to describe the plugin,
- the actual code of the plugin in the php file (name it whatever you want).

3/ Write the Readme file

A basic Readme file looks like this:

=== Like ===
Contributors: bottomlessinc
Donate link: http://blog.bottomlessinc.com/
Tags: share, facebook, like, button, social, bookmark, sharing, bookmarking, widget
Requires at least: 2.3
Tested up to: 2.9.2
Stable tag: 1.0

The Facebook Like Button Widget adds a 'Like' button to your Wordpress blog posts.

== Description ==
Let your readers quickly share your content on Facebook with a simple click.

== Installation ==

1. Upload `tt_like_widget.php` to the `/wp-content/plugins/` directory
1. Activate the plugin through the 'Plugins' menu in WordPress
1. (Optional) Customize the plugin in the Settings > Like menu

== Frequently Asked Questions ==

= Is Like free? =

Yes

== PHP Version ==

PHP 5+ is preferred; PHP 4 is supported.

== Changelog ==

= 1.0 =
Stable version

You can get more information on the readme file with this more elaborated example.
Wordpress also provides a readme validator the way W3C does for XHTML validation.

4/ Write the PHP file

Only one function will be called in the file, the init function:

tt_like_init();

It does three main things:
- register and retrieve the parameters of your plugin if you have any (you will be able to set those in the settings page)
- register your own function to be called when an event happens, here an event called ‘the_content’ called every time the content of the post is rendered. Our plugin here will just append some content at the end of the post content.
- register your own function to be called to render the settings page in your Wordpress admin panel so you can customize your plugin.

function tt_like_init()
{
    add_option('tt_like_width', '450');
    add_option('tt_like_layout', 'standard');
    add_option('tt_like_showfaces', 'true');

    $tt_like_settings['width'] = get_option('tt_like_width');
    $tt_like_settings['layout'] = get_option('tt_like_layout');
    $tt_like_settings['showfaces'] = get_option('tt_like_showfaces') === 'true';

    add_filter('the_content', 'tt_like_widget');
    add_filter('admin_menu', 'tt_like_admin_menu');
}

The add_option function is provided by the Wordpress API and registers the default values of your options.
The previously saved setting are retrieved using get_option() and stored in our global variable we named ‘tt_like_settings’.
Our function tt_like_widget() will get called every time the content of the post needs to be rendered as we registered it with the add_filter() function.
In a similar manner, tt_like_admin_menu() will get called to render the settings page in the Wordpress admin interface.

The tt_like_widget() function is pretty straight forward: just append whatever you want to append to the $content variable.

function tt_like_widget($content)
{
     $showfaces = ($tt_like_settings['showfaces']=='true')?"true":"false";
     $url = urlencode(get_permalink()) . "&layout="  . $tt_like_settings['layout']
                                . "&show_faces=" . $showfaces
                                . "&width=" . $tt_like_settings['width'];
     $button = '<iframe src="http://www.facebook.com/plugins/like.php?href='.$url.'" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:'.$tt_like_settings['width'].'px; height: 50px"></iframe>';
     $content .= $button;
     return $content;
}

Here we build a Facebook Like button which is just an iframe pointing to a Facebook URL having the URL of the current post as parameter.
It means we need to retrieve the URL of the current post dynamically, this is done using get_permalink()
This is also the place we use our settings to produce a Facebook Like button customized according to the settings on the admin page.

And now for the settings on the admin page. We basically build an html form that will record the user preferences.

function tt_plugin_options()
{
    $tt_like_layouts = array('standard', 'button_count');

    <div class="wrap">
    <h2>Facebook Like Button</h2>

    <form method="post" action="options.php">
    <?php
        if (tt_get_wp_version() < 2.7) {
            wp_nonce_field('update-options');
        } else {
            settings_fields('tt_like');
        }
    ?>

    <table class="form-table">
        <tr valign="top">
            <th scope="row"><?php _e("Width:", 'tt_like_trans_domain' ); ?></th>
            <td><input type="text" name="tt_like_width" value="<?php echo get_option('tt_like_width'); ?>" /></td>
        </tr>
        <tr>
            <th scope="row"><?php _e("Layout:", 'tt_like_trans_domain' ); ?></th>
            <td>
                <select name="tt_like_layout">
                <?php
                    $curmenutype = get_option('tt_like_layout');
                    foreach ($tt_like_layouts as $type)
                    {
                        echo "<option value=\"$type\"". ($type == $curmenutype ? " selected":""). ">$type</option>";
                    }
                ?>
                </select>
        </tr>
        <tr>
            <th scope="row"><?php _e("Show faces:", 'tt_like_trans_domain' ); ?></th>
            <td><input type="checkbox" name="tt_like_showfaces" value="true" <?php echo (get_option('tt_like_showfaces') == 'true' ? 'checked' : ''); ?>/></td>
        </tr>
    </table>

     <?php if (tt_get_wp_version() < 2.7) : ?>
       <input type="hidden" name="action" value="update" />
       <input type="hidden" name="page_options" value="tt_like_width, tt_like_layout, tt_like_verb, tt_like_colorscheme, tt_like_showfaces"/>
    <?php endif; ?>

    <p class="submit">
    <input type="submit" name="Submit" value="<?php _e('Save Changes') ?>" />
    </p>

    </form>
    </div>
}

Here we have some code for an input box, a dropdown menu and a checkbox as example.
There is some handling for earlier version of Wordpress.
Refer to the options page help for further information.
The _e() function is here for internationalization.

5/ Submit your plugin to the Wordpress directory

Submit your new plugin to the directory by providing a unique name for it.

You will then be able to upload it to the SVN repository.

6/ Check in your code in the SVN repository

After Wordpress approves your plugin (it took 3 days for this one), you can check your code in the provided SVN link.

bash# mkdir ~/my_wp_plugin
bash# cd ~/my_wp_plugin
bash# svn co http://svn.wp-plugins.org/like
A    like/trunk
A    like/branches
A    like/tags
Checked out revision 233010.
bash# cp ~/wordpress/wp-content/plugins/like/readme.txt trunk/
bash# cp ~/wordpress/wp-content/plugins/like/tt_like_widget.php trunk/
bash# svn add trunk/*
A         trunk/readme.txt
A         trunk/tt_like_widget.php
bash# svn ci -m "First stable version"
Authentication realm: <http://svn.wp-plugins.org:80> WordPress.org Subversion
Username: bottomlessinc
Password for 'bottomlessinc': ****
Adding         trunk/readme.txt
Adding         trunk/tt_like_widget.php
Transmitting file data ..
Committed revision 233012.
bash#

Now you can tag the revision of the plugin as your first version.

bash# svn cp trunk tags/1.0
A         tags/1.0
bash# svn ci -m "Tagging v1.0"
Adding         tags/1.0
Adding         tags/1.0/readme.txt
Adding         tags/1.0/tt_like_widget.php
Committed revision 233013.
bash#

Now that your code is checked in with the mandatory readme.txt file and you tagged the version 1.0 of your SVN to match the Stable tag: 1.0 in readme.txt, Wordpress will do all the rest and package it for you.

It will be available to a URL resembling http://wordpress.org/extend/plugins/like making it accessible to all Wordpress user and providing you download statistics and feedbacks from users.

You can also promote your plugin further by submitting it to wp-plugins.

7/ Installation of the plugin

Here is the complete code for the widget:

Facebook Like Wordpress Plugin (Latest Version)

Unzip it in your plugin directory.

bash# cd ~/wordpress/wp-content/plugins/
bash# wget http://blog.bottomlessinc.com/wp-content/uploads/2010/04/like.zip
bash# unzip like.zip

Then go to the Wordpress admin dashboard, activate it, and optionally customize it in the settings page.

8/ Customize the plugin

The plugin works out of the box without configuration as it uses the IFRAME version of the button.

Optionally you can use the XFBML version but it requires more setup and a better knowledge of the Facebook platform as you will need to create a Facebook Application and enter its App ID in the settings page of the plugin.

Which one to choose, IFRAME or XFBML?

It really depends on how technical you are.
If you are not, stick with the default settings using the IFRAME version.
If you are technical you can venture in the XFBML version, but even there you will hit snags as Facebook is notorious for producing unstable Javascript and not getting things to work the first time (a daily struggle when you develop Facebook applications).

With XFBML, the user who clicked the Like button can add a comment that will be attached to the post on his profile.

Facebook XFBML Like button comment

The benefit of using XFBML is purely real estate: provided the user not only clicks the button but adds a comment, the profile post will now include the image you entered in the Settings of the plugin along with an excerpt of the article.

For comparison here is the one liner you will see if using IFRAME or if using XFBML when the user did not add a comment…:
Facebook Like button wallpost IFRAME

… and here is the profile post the user will generate when adding a comment with the XFBML version of the button:
Facebook Like button wallpost XFBML

Even though Facebook provides a simplified interface to generate a new Application, it doesn’t work right away.

When I first set it up I had this message when clicking the button:

The application ID specified within the “fb:app_id” meta tag is not allowed on this domain. You must setup the Connect Base Domains for your application to include this domain.
Facebook ©2010

When editing the settings of the Application itself, I couldn’t see anything wrong, and hit the “Save Changes” button without modifying anything.
Surprisingly it raised this error, refusing to save the (non existing) changes:

Validation failed.

Connect URL must point to a directory (i.e., end with a “/”) or a dynamic page (i.e., have a “?” somewhere).

In this case just edit the Application, go to the “Connect” tab and in the first field called “Connect URL”, make sure your website ends with a forward slash.
For instance I had to manually change my Facebook Connect URL from “http://bottomlessinc.com” to “http://bottomlessinc.com/” to make things work.

And even after that, when using the XFBML version the button doesn’t show up in around 20% of the page refresh.
That’s why sticking with the default IFRAME version is more reliable.

There is also a chance that adding a slash to your Connect URL will solve the problem of the Like button blinking (showing up as pressed then right away as unpressed).
During this blinking of the button you can see the message “You like http://example.com” which disappears also right away.

If you use the XFBML version of the plugin, you must provide the numerical Facebook ID of the Facebook user you will use to manage the pages.
Otherwise people clicking on the Like button will receive this error:

You failed to provide a valid list of administators. You need to supply the administors using either a “fb:app_id” meta tag, or using a “fb:admins” meta tag to specify a comma-delimited list of Facebook users.

Did you find this post useful? Like it on Facebook :-) and Spare a few cents:

Tags: , , ,

264 Responses to “Creating a Wordpress plugin: Add the new Facebook Like button to your posts”

  1. JC says:

    Hi, I’m using your plugin but the url obtained is not actual post url that was liked but instead a fixed subdomain url (http://www.shinnpark.com/products-page/sale/). Any idea why?

    Appreciate your assistance.

    Cheers
    JC

  2. Seags says:

    HI, I am using this plugin on a number of my websites. It works fine when using the default iframe but as soon as I used the XFBML it does not even show up.

    I have created the app on Facebook and I have saved it to ensure it is correct.

    On further investigation I get a “b is undefined” in FireBug.

    Any ideas?

  3. Sid says:

    Thank you for your plugin. Encountered a small problem (using iframe). When I checked “Use Excerpt as Description” the plugin started to add the iframe code in the header too (between the metas). Checking both top and bottom added it 2 times in the header, then at the top and at the bottom of the post, as it should. Atahualpa theme.

  4. Gordon says:

    It would appear that your plugin has an issue with the theme Atahualpa 3.5.1 by BytesForAll – try it and look in the header of the source to see what I mean. It adds an iframe into the header section of the code !!!!

  5. Shiva says:

    How to add “like” to a template? any hook?

  6. Tink *~*~* says:

    How can I change the “Be the first of your friends….” text? Can’t find a setting where I can do that….

    thanks -

  7. Álvaro says:

    It’s possible to discard categories in the plugin?

  8. Michael says:

    On my admin pages I only see myself and my friends as likers, but not the other people who pressed the like-button. Do you have any idea how this comes? Thanks a lot for your help!

  9. Hey, I have a small problem. When someone clicks the Like button in my blog, the text that appears in Facebook looks like this:

    Level up! » Blog Archive » Level up! on juusopalander.com

    The first “Level up!” is the name of the blog. I’d like it to be: Juuso liked Level up! (postname) on Level up! (blogname)

    Any suggestions how to do that?

  10. @Tink: This is not possible. Well, you could possibly manipulate the text (content) with CSS, but this should be against the guidelines…

    @Michael: This is just the way the like-button-plugin works. Maybe you have seen the like-box-plugin without stream and header somewhere… Take a look at http://developers.facebook.com/plugins ;)

    @Bottomless Inc.: Is this plugin suitable for integrating the og:tags only? I have already built my own like-button-implementation and would like to have a consistent administration for my og’s… Thx!

  11. PlF says:

    @Andreas
    It supports all the og tags from the open graph protocol.
    The plugin is actually listed in the implementations (http://opengraphprotocol.org/)

  12. Hi

    We like your plugin very much but have been disappointed as we keep losing the count. We had 16 likes on a post yesterday and today it has defaulted to ‘be the first to like this’ We are using the default iframe setting and Mystique theme.

    Any ideas how to solve this?

    Many thanks

    Andy

  13. TheRioTimes says:

    Hi, anyone having a conflict with Like and Share this?

    If the “Like” plugin is activated it seems to remove the “ShareThis”… although not everywhere, see my dev site:
    http://riotimesonline.com/dev/

    But I have seen it work, on this site:
    http://www.brazilnyc.com/2010/03/dancebrazil-in-nyc/

    I really want to have both!

    Please help if you can.

  14. Laughing Spaniard says:

    The wordpress facebook like plugin doesn’t work unless you MANUALLY add this in. (please correct for next version)

  15. Laughing Spaniard says:

    code didn’t post. Anyway it’s the header w3.org xmlns info for xfbml. ”

  16. LaughingSpaniard says:

    How to suppress it in a few particular pages or posts? Is there a tag to add?

  17. Michael says:

    @Andreas Sefzig: I’m taling about the button’s Admin Page of facebook, not my blog.

  18. Michael says:

    @PIF I still have the issues I described here: http://blog.bottomlessinc.com/2010/04/creating-a-wordpress-plugin-add-the-new-facebook-like-button-to-your-posts/comment-page-1/#comment-1761

    Additionally, my new blog has an apostrophe in it’s name, which seems to be a problem when people like the page without giving additional comments. You can try it out at http://michael.eisenriegler.at/. In fb my site’s name shows up as: “Michael likes Willkommen zu Michael Eisenriegler’s Repository! on Michael Eisenriegler's Repository.” Do you have any solution for that?

    Thanks a lot,

    Michael

  19. PlF says:

    @Andy Britnell
    Are you still losing the count? You would lose the count if you change the permalink of an article or if you move it somewhere else.

    @TheRioTimes
    Are you using the Addthis plugin? The two are indeed conflicting and the next version should fix this.

    @Laughing Spaniard
    The plugin automatically adds the xmlns:og and xmlns:fb declaration.
    The link you refer to is wrong saying the html tag should be inside the head. Plus they add only the xmlns:fb tag and forget the xmlns:og.
    Both tag should be added automatically at the right place by the plugin, what is your website so we can take a look at the source?

    @Michael
    Thanks for catching the single quote problem, it will be solved for the next release.
    For the blog/article type currently we only support articles because the buttons appear next to articles, even on the front page.
    For the language, you Facebook language setting will determine how the button if displayed (Like or Liebe,…) and you Wordpress settings will determine how the plugin configuration page in the Wordpress admin dashboard is being displayed.
    If you want the button to read “Liebe” instead of “Like”, change you Facebook language settings (but it will display it only for you, the beauty is that others with different language settings will still see “Like” written in their own language)

  20. Eric Angelo says:

    Hello, I am very new to the game:

    How do I change the colour scheme other than “light” or “dark”? Neither are readable on my website!

    I checked the code in the .php file but I’m unfamiliar with the coding.

  21. Eric Angelo says:

    Also, when I click the like button on my site it equals 4 likes

    “Eric and 3 others like this” I tried 4 times, each time it did this.

  22. @plf: Thanks, but how do I suppress the like box on a particular page (or for a particular post–doesn’t much matter). Is there a tag to add to the post or page to suppress the like box just for that page or post?

    As far as the xmlns:fb declare, for whatever reason the plugin did NOT add it anywhere, though the og tags did get added (this is wordpress 3.0 with headway). I put the xmlns:fb myself inside the head, but before the header, and it seems to work fine there. (That’s also where og was put by the plugin.)
    I don’t see that the plugin added any “xmlns:og” either, though it did add other og tags. What xmlns:og tag do I need to add? It seems to be working fine without the xmlns:og tag.

    My website is http://www.laughingspaniard.com/
    thanks.

  23. Michael says:

    @PIF:
    Regarding single quotes: This happens with different types of single quotes, I already tried two of them.

    Regarding og:type: The problem seems to me that “article” would be the correct type, but only “blog” gives me the Admin page, or did I miss anything? IMHO, there is no Admin Page for “article” and no link to it. What would you recommend?

    Regarding language of the button: Nope, I don’t see it this way. Your default configuration gives me the English buttons, no matter what language I use on fb. So I edited the line “‘//connect.facebook.net/de_DE/all.js’;” inside the plugin, now everything is in German (even for you!)

    cu,

    Michael

  24. To be cautious, I added the xmlns:og and moved it and xmlns:fb to the very top, before even the head. (Facebook could use better developer docs.)

  25. Davo Hugo says:

    Hi there

    I recently added the “Like” wordpress plugin to two of my sites …. at JamesHughesBlog.com, and at EmmaMcLaughlan.com

    On both sites, I can “Like” a post … and it will appear on my profile page, along with an image and title etc in the small popup when rolling the mouseover the link on facebook, and it also adds to my Likes and Interest page on my Info page on my profile. Thats all GREAT and Im really pleased with it.

    However, only on JamesHughesBlog.com does the Like notifications go to my friends “News Feed”.

    So if I click “Like” on EmmaMclaughlan.com it will appear on my profile but not in my friends “News Feed”.

    I have the exact same set up it seems on both, the only difference being obviously a different facebook application set up for each.

    Can anyone suggest why it would be working on one, and not the other??

    I have tried for hours on this to work it out, please help.

  26. Aspa says:

    The plugin has recently stopped working for me. No error, but pressing the like button doesn’t do anything anymore. The number of likes to my previous posts (when it used to work) has also disappeared. I am using the default options. Any ideas?

  27. Ondrej says:

    Is there any way not to have the vertical gap between the line with the button and the top end of the post? See a test site here: http://programs.apex-test.com/1935/apex-foundation-on-facebook/ Thank you.

  28. isuquinndog says:

    Thanks for this plugin!!

    Right now when I add this to my blog and I Like it, it shows the URL of the blog post, not the title of the blog post. How can I fix that? Thanks so much!

  29. Shawn says:

    is there a short code I can use to put the ‘Like’ button in where I need it? I want it on my homepage but it was getting placed in an odd area of the page, and pushing some images around. Any ideas? Thanks!

  30. Davo Hugo says:

    Ok my problem is now the “Likes” from my Pages will appear in the NewsFeed … but the “Likes” from my blog posts wont appear in the NewsFeed…. please help

    (website: http://www.emmamclaughlan.com)

  31. Ondrej says:

    How it picks up the “excerpt” for the Open Graph? When I post a link at our FB page, it will correctly pick up the beginning of the post. But when I check the “Use excerpt for description” in this plugin, og:it will show a label of the Socialize plugin, which is placed under the post, as Description. Why the difference? And mainly, how to fix this? http://ogit.heroku.com/inspect?url=http://programs.apex-test.com/76/uk-english-plus-work-experience-nvq-copy-doc/

  32. With all the like plugins I’ve tried (yours included) the image I select sometimes works, but other times the plugin just selects another random image from my page and uses it for the facebook post instead. Any ideas?

  33. Zach says:

    Mike-ENDOtactical –

    I have the same issue! It seems to just select a random image from the page. Has anyone found a solution?

  34. wordpressin says:

    Hi I’ve used this plugin on another site & had no issue using both the iframe and xfbml versions. Hopefully someone could share some insight.

    Currently I can use the Like button when I select Load XFBML Asynchronously. When I do this you can click Like & write a comment and it will post on my Facebook page. So I know the Facebook settings are set fine etc…

    The problem is when I select “Use XFBML” as well the Like button disappears. This is an issue because the content doesn’t get the meta info sent over to Facebook including the image I set etc etc… Any feedback on this would be great!

  35. Eric Angelo says:

    How do you change the text colour?

  36. bill says:

    I am using the framed version, and in the plugin settings, I put a correct url path for the image to display on facebook when a comment is typed, but it is not displaying the correct image on facebook. It appears to be pulling an image from my widgeted sidebar (on each test I tried, it pulled a different image!)

  37. wordpressin says:

    Yup having the same issue, I set an image url and the image is not getting picked up by Facebook, everything else is. When I go to Facebook it shows a little icon of a grey robot guy, what does that mean!?

  38. wordpressin says:

    I figured out something with this plugin. For some reason it started pulling one of the icons from the Add To Anything plugin. After I deactivated that plugin, the image in Facebook would grab the post image. Yet I have an image url set with XFBML :/ Any ideas? This is very confusing, as I said before I’m using this with another blog with no issues.

  39. Rami says:

    Can i extend Open Graph using this plugin?

    in i can use filters to add custom opengraph_{name} where {name} is the unqualified Open Graph property name.

    Can you add this to your next version of the plugin?

  40. Sam Stevens says:

    Looks like a great plugin. When I enable it though, regardless of placement, it makes the TweetMeme Tweet This button disappear.

  41. regole-se says:

    Grat plugin!!!
    …but there is no possibility to insert the button in feeds :(
    Will this feature be implemented? :)

  42. As a request for enhancements: w3c compliance.
    The plugin seems to produce some w3c errors — enter a webpage with the plugin (and widget) activated and see:
    http://validator.w3.org/unicorn/
    thank you.

    here are some errors:
    xmlns:fb=”http://www.facebook.com/2008/fbml”> Attribute xmlns:og not allowed here.
    xmlns:fb=”http://www.facebook.com/2008/fbml”> Attribute xmlns:fb not allowed here.
    Attribute property not allowed on element meta at this point.
    Required attributes missing on element meta.
    etc.

  43. PlF says:

    @Laughing Spaniard
    There’s no tag to customize the button per post.
    For the xmlns:og and xmlns:fb tag, they must be with the html tag.
    However note that the W3C validator doesn’t take custom name tag into account so it will not validate.

    @Shawn
    Theres’s no short tag for now.

  44. @PlF
    Thank you for the information about custom name tags. Note that the plugin is actually the one adding the xmlns:og and xmlns:fb tags (after I switched to using the twentyten theme), and the tags look like they are with the html tag. However the page is not w3c validating them.

  45. nommo says:

    Hey PlF, all,

    Looks like a nice plug-in… just trying to get my head around Open Graph. I am having a couple of issues on my blog (I actually use my personal blog as a testing ground for plugins before I roll them out on production sites for my day job)….

    I am using the iframe version not FBML (standard not button count)
    I have entered my correct facebook numerical account ID
    I have liked my own post and have 6 others who liked it
    But I cannot see the admin link :(

    Also – the blog post I am trying it out on has an apostrophe in it which is not being displayed correctly in Facebook, and the site title is blended with the post title:

    “Nommo’s Elderberry and Bramble wine” is displayed as “Nommo’s Elderberry and Bramble wineConvergency”

    You can see here: http://www.convergency.co.uk/blog/2009/11/nommos-elderberry-and-bramble-wine/

    I tried reading comments & FAQ but not finding any answers – can anyone help?

    Thanks

  46. nommo says:

    And of course the html special character encoding was parsed by Wordpress here ;)

    So what I meant to say was:

    “Nommo’s Elderberry and Bramble wine” is displayed as:

    “Nommo’s Elderberry and Bramble wineConvergency”

    Hopefully that will work :)

    Cheers

  47. Bujaka says:

    Can I disable the share option after clicking like. I don’t want to let people share the posts just like them. If possible, how? Thank you!

  48. Hey PlF

    The plugin works great. But I think there is some bug in the “margin” settings. Even if I change the margin space values in the settings, nothing shows up in the website source code. The only thing set in code is “width=450″. Other parameters dont show up at all.

    You can check it on my website http://brijux.com (like button is not set on home page, you can see it by going to any individual post)

  49. Bethany says:

    Having similar trouble as Brijesh. Trying to give some separation between the like button and my post content but the bottom margin doesn’t work. I’ve even tried adding a top margin to my content but it keeps pulling it up somehow. It starts out correct then once the page loads it pulls it up right under the like button. Any thoughts?

    http://bethanygilbert.com/blog

  50. Taylor says:

    Is there a way to make the image that is linked the POST image? That would be really cool? Is there a way to do this? To code this? Any thoughts?

  51. I can’t seem to find a wau to edit settings. Like button is at both top and bottom of the complete post but does not appear within the excerpts.

    Example: http://smartregion.org/2010/08/virginia-first-in-defense-spending/

    please advise; thx

  52. ok, found the settings and only have Like button at top of post but still nothing within excerpts and the “Like” doesn’t seem to be carrying over to my related Facebook page. what have I done wrong? thx

  53. Reynaldo says:

    How to do manual placement?

    seems doesn’t work

  54. Pelznase says:

    Hello! I have a question about the plugin. You habe this green “H” beside your posts at Facebook.
    How and where can I define such a graphic?
    Up to now ist uses my youtube oder rss-button.
    But I would like to have a certain graphic there.

    Regards

  55. Lennie says:

    I get the following error on my pages:

    You must specify an “href” attribute to the iframe. Something like .

  56. JD Mahs says:

    Thanks for the plugin – it was easy to install. However, there are two problems we are experiencing: one problem is when someone clicks the Like button, it shows up on their Facebook profile and the link that appears is clickable to our blog post. However, the URL that shows up under the link is not the correct link – it is only a portion of the link (it doesn’t include the /blog2 at the end). The second problem is the description that appears – the description is our generic blog description, not the description of the post. When I modifed the plugin settings for description (turned on that check box), the description is just a bunch of coding – not real words.

    How can we change the URL to the correct URL?
    How can we get the description of the actual blog post to show?

    Thanks for your help!

  57. Rami says:

    function single_image_thumbnail() {
    global $post;
    if ( !function_exists( ‘has_post_thumbnail’ ) ) return;
    if ( !is_singular() or !has_post_thumbnail( $post->ID ) ) return;
    $thumb = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), ‘medium’ );
    echo ”;
    }
    add_action( ‘wp_head’, ’single_image_thumbnail’ );

  58. Rick Ross says:

    How do you change font color to a custom color?

  59. Fred says:

    Hi,

    Love the plugin. Just a heads up that it’s not parsing apostrophes correctly in the blog title. E.g., I liked the test post on my new blog and the Facebook update read: Fred likes “The Tortuga Backpacks’ Story on The Tortuga Backpacks' Blog” instead of “Fred likes The Tortuga Backpacks’ Story on The Tortuga Backpacks’ Blog.” The plugin seems to be handling the page title fine though. I suspect others are having the same problem. I didn’t want to fix the code on my end and have to redo the effort every time that you update the plugin.

    Thanks in advance for any updates. Keep up the good work!

    -Fred

  60. I do not know if it is supported now, if not, it would be great to implement it: optional NOT showing the Like button for some posts, e.g. with somethink like NOLIKE custom field

  61. Dennis Madsen says:

    Hello,

    Thanks for your plugin. I got problem with validation on W3C. The following meta-tag is not valid:

    Can you please fix that?

    Thanks!

  62. Dennis Madsen says:

    Sorry, it deleted my HTML. The meta-tag is the one with the property og:site_name.

Leave a Reply