Facebook Like Button for Wordpress V3
[VERSION 4.0][THIS POST CLOSED CHECK V4 POST]
http://blog.ahmedgeek.com/facebook-like-button-for-wordpress-v4
[UPDATE 13/5/2010]
- Multiple languages support (By: Anty (http://anty.at)).
- Now you can change the font (By: Anty (http://anty.at)).
- Code has been rewritten.
- Database table removed, Replaced with options to avoid problems.
[UPDATE 8/5/2010]
- og:site_name meta tag has been added to the header, So when somebody likes your post it’s going to appear on Facebook like this “User liked POSTNAME on SITENAME”.
Finally it’s here, V3… All features based on users requests
Features
- Shortcut added to show the button manually. [more info]
- Live preview in the settings section.
- Option to hide in the home, pages or posts.
- Bugs fixed.
You can add the button to your template by adding these 2 functions:
For the normal button:
if (function_exists('Short_Button')){ echo Short_Button(); }
For Count button:
if (function_exists('Count_Button')){ echo Count_Button(); }
Screenshot
Download:
http://wordpress.org/extend/plugins/facebook-like-button/

Wow.. that was a quick solution. Works great!!!
Hi Ahmed,
Has anyone else mentioned that in the settings they get a blank screen?
Thanks,
Lacy
Reply:
May 13th, 2010 at 10:52 pm
i sent you email
Salam
I liked your developing very much, kindly see this site http://max99.ninja.pk
There when those people who LIKE, their avatars are half shown. is that bug?
Reply:
May 15th, 2010 at 6:29 am
Hi Aaqil,
No it’s not a bug just change the height, if it’s 40 make it more.. or if it’s nothing, make it 40 and test it..
Jazakallah for the quick response.
70 height is for me it is superb now http://max99.ninja.pk/?p=421
Hello, I’ve got a “Fatal error: Cannot redeclare class snoopy in /homez.167/websitename/www/wp-includes/class-snoopy.php on line 33″ wen I’m opening the settings window on this plug.
Am I alone ?
I also see the error:
Fatal error: Cannot redeclare class snoopy in /usr/local/pem/vhosts/164488/webspace/httpdocs/wp-includes/class-snoopy.php on line 33
The plug in works on the site, but I can’t access the plug in settings page in my dashboard…
Thanks.
Just to add, that was after your most recent update, which I updated automatically in wordpress 2.9.2
I also have the same fatal error as LIZ and can’t access the settings…
Reply:
May 19th, 2010 at 6:56 pm
@ Island Consulting
This problem is caused by another plugin…
@Scott, Liz, Manogr
Sorry for being late, i had exams all the week… but i released update today,, it should solve the problem
Cheers
Hi!
Great Plugin!
I had a question, when I ever someone pushes like on my website, cachesf.com, facebook does not post the title of the post. it just says bryan likes cachesf.com at cachesf.com
how do i change this to show the title?
thank you!
[...] das Ganze nun zu Nutze gemacht? Ich habe zwei Plugins neu installiert. Das eine nennt sich simpel “Facebook Like” und ist nicht unbedingt nötig, wenn man sich was mit HTML/CSS auskennt. Ich bin aber [...]
[...] Facebook Like Button for WordPress ??????? ? WordPress ??????????? Facebook ?????????????????? [...]
Hey, thanks. The update fixed the settings problem. I noticed now that it’s very slow to load… wondering if that’s related? The site is http://nostupidanswers.com.
Hope your exams went well
Reply:
May 21st, 2010 at 2:04 pm
Hi Liz,
I don’t thing it’s related, it works for me fast and with no lag…
One question: If you put it manually in the template as I do to avoid the duplication of the box? Thanks
Reply:
May 23rd, 2010 at 7:44 pm
@ Tony
haha, i think i need to think about this
..
@juggledad
Done
@Jason
Can you provide screenshot ?
@anty
I would like to keep it secret at this point
@vincent
What version of php do you have?
There is a bug in the code. The ‘Container Class’ doesn’t apply. You have to edit buttons.inc.php, after line 22 which is:
‘ht’ => ‘ht’, //Height Type px or em
you must add
‘css’ => ‘css’, //Container Class name
HI No matter what pages i try this on i get “could not be reached.”
Tried XFBML as well, no luck
any suggestions
Can you elaborate what the API-keys and the activation-code in the latest update is all about?
Hi i just updated from the 3.6 version (that worked properly) to the 3.8 that gives me that bug when i try to acrivate plugin:
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /home/mhd-01/website/htdocs/wp-content/plugins/facebook-like-button/inc/activation.php on line 5
version 4.4.4-8+etch6. server it’s not mine. can’t update phph version.
where can i download again version 3.6?
Reply:
May 23rd, 2010 at 9:40 pm
You can download it from here: http://downloads.wordpress.org/plugin/facebook-like-button.3.6.zip
Hello again, Ahmed
You did two updates this last (2/3)days, and the first one solved my problem but the realy last update is giving me an other bug :s
“Fatal error: Cannot redeclare class snoopy in /homez.167/gropix/www/wp-includes/class-snoopy.php on line 33″
is it possible to have a link to download the v° juste befor please :s
I did an otomaticupdate by mistak -_-’…
That would be great
(ans sorry for my english, Im french^^)
Reply:
May 24th, 2010 at 12:24 am
mmm weired, i didn’t change the code or anything :S
You can download it from here: http://downloads.wordpress.org/plugin/facebook-like-button.3.6.zip
Whene Im setting to the setting tab :
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /homez.167/gropix/www/wp-content/plugins/facebook-like-button/inc/activation.php on line 5
Realy sorry to be enoying :s
Reply:
May 24th, 2010 at 6:27 am
download 3.6 from the link in the last comment
3.6 is not working for me. But the 3.7 is ok
Hi,
How can I manually position the plugin in my theme ??
I tried
if (function_exists('Short_Button')){ echo Short_Button(); }but nothing happens…Cheers
Reply:
May 25th, 2010 at 7:56 pm
@Pablo
If guess you un-checked show in post, pages and home… Which is right but i missed that when i was writing the code :S.. Sorry will fix it today or tomorrow
I installed this on my site and it works well, in terms of appearing below the post & functioning correctly, however the problem I am having is in the information it is sending to facebook. When a person clicks ‘like’ on a post, it simply posts my blog title & tagline to their wall, rather than the actual post title that they ‘liked’.
Is there a way to ensure that the POST title is what is sent to facebook, NOT my blog name?
Thanks
Reply:
May 25th, 2010 at 7:57 pm
Will contact Facebook and see what i can do
I think there are a few bugs (I’m too new to php to be certain, so I say “think”) in 3.8
First in buttons.inc.php ‘css’ is not included in the arrays for either Short_Button or Count_Button, but the code for both XFBML and iframe include:
I’m not clear if ‘css’ was omitted because there were only to be used by people modifying their template (as I am) or if “‘ . $Value['css'] ‘” was accidentally copy/pasted into those functions.
Second, using a div in $SDK makes it impossible to place the button inline with other elements, I’ve changed this to a span (actually I’ve changed all your divs to spans, but I don’t think all of them are necessary). Not so much a bug as a usability enhancement.
Like I said up front I’m new to php hacking so I could be totally wrong… you clearly know WAY more then me so I apologize if I’m wrong on any of this.
Thanks for the plug-in!
Reply:
May 25th, 2010 at 8:04 pm
@Jon..
Actually you are right in everything, i thought i fixed the CSS thing
… Will change the divs into spans next time.. And thanks for taking your time to write your feedback and suggestions…
Hi Ahmed,
I’ve tried to use your 3.8 version of Like Button plugin. It shows me an error:
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /home/virtual_web/xawieur.cz/public_html/www/wp-content/plugins/facebook-like-button/inc/activation.php on line 5
Reply:
May 25th, 2010 at 8:05 pm
The problem is that you have PHP version 4 i guess, which soo old for the code. however you can install version 3.6 or 3.7 while i fix this problem
@Ahemd – Thanks! Glad I could help and that I got things right.
when the like icon is on the post, it gives a huge space area between the button and the post. What’s up with that please?
[...] Facebook Like: Otro plugin relacionado con Facebook, este nos permite añadir un “Me gusta” al final o principio de cada post. [...]
Help!!! Just updated to your latest, and the plugin cannot be activated:
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /usr/local/pem/vhosts/164488/webspace/httpdocs/wp-content/plugins/facebook-like-button/inc/activation.php on line 5
[...] Facebook Like button [...]
Hi, there’s a huge white space below the button… how do i fix that?
Hi Ahmed, i installed the plugin and it is working fine but there is a huge white space underneath the like button… it appears when i move the button above and below the content. how do i fix this? i’m using wp 2.9.2 and php5.
Reply:
May 26th, 2010 at 8:14 pm
hi Kira,
Just change the height to 40px or as you like, until you get the best view
[...] the Facebook Like Button for WordPress for more [...]
[...] the code is available directly from Facebook. I went the plugin route and used the one aptly titled Facebook Like. It’s hard to believe that the Facebook Like button has only proliferated the entire Internet [...]
[...] a more visual person, try this YouTube tutorial from DuctTape Marketing. Personally, I use the Facebook Like plug in for [...]
[...] are also WordPress plugins available. Try it out at the end of this [...]
[...] was super easy to add with my hosted WordPress blog. Here is the Facebook Like plugin I used. No [...]