Moderator
t-p
(@t-p)
check out this WP-Snippet.
Thanks. I changed it to <iframe src="http://www.facebook.com/plugins/like.php?href=<?php the_permalink(); ?>&t=<?php the_title(); ?>&layout=button_count&show_faces=false&width=100&action=like&colorscheme=dark" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:20px;"> but it still generates gobbledy-gook on their FB page when someone likes it.
Why did you change it? Did you try the code that was suggested?
Maybe a plugin solution would be better suited?
http://ww.wp.xz.cn/extend/plugins/search.php?q=facebook+like
Mark,
Thanks for taking the time to reply.
I tried the code generated from the Facebook developer site. I changed it because it was generating a low number of likes compared to code using ?php the_permalink(); ?.
I didn’t try the WP-Snippet because I’m wanting the like button and a current count to show.
I tried one highly rated plugin (don’t recall which) for individual posts, but when I told it to place a Like button at the top and bottom of the posts, it put them following the <!–more–> break.
I ended up manually coding the FB Like and Twitter buttons into my post and page template files and they work great, but I really want a LIKE button for the home page too.
Where are you placing this code, into a field in a theme option, or one of the theme’s template files?
No idea how these like buttons work myself(don’t use facebook, etc), but it’s still just code, it should be a relatively simple process..
In a sidebar text widget. It’s not currently active, but it would be in the right sidebar on http://gpstracklog.com, just below the FB icon and FB text link. There is an active version at http://test.gpstracklog.com
Ok, but are you entering the code into the widget’s text field or into the sidebar file in the current theme’s folder?
In the widget’s text field.
The code is out of context inside the text field of a widget though, and additionally they do not except PHP code (though plugins can enable this).
Ideally this code belongs in the sidebar file. If you want the code only included on particular pages you can work around that by creating an additional sidebar file and including that sidebar (in place of the regular one which should be the same minus the like code) under your chosen conditions..
If you would like me to explain or clarify anything said above let me know… 😉
Doh! I should have figured that out. I think I’m going to give up, since there is a Facebook issue I haven’t been able to figure out (why its reporting different numbers of followers). I think I’ll just go with their stock code; the “Like” count will build with time.
Thanks for your help.
It’s probably different because your PHP code was sending the wrong URL via the text widget rather than your actual URL.
Facebook appears to match URL up to a certain point, I’ve tried chopping off characters from an URL and it still shows the correct count.
So the chances are somebody else was trying to do the same thing and therefore generated the extra likes you see for the incorrect gobbleygook.