Facebook like for BuddyPress
No need of a plugin, just insert
<iframe src="http://www.facebook.com/plugins/like.php?href=&layout=standard&show_faces=true&width=450&action=like&colorscheme=light” scrolling=”no” frameborder=”0″ allowTransparency=”true” style=”border:none; overflow:hidden; width:450px; height:60px”>
on the page where you want to add the like button. Then change the permalink to the correct one.
In the moment its the like script for groups.
would not be hard to make a plugin for this if someone have the time.
fine but we need something dynamic to be put on every post on the BuddyPress site. on forums, groups etc…
I think this is the same solution as @Svenl77 posted http://wpmu.org/how-to-add-the-global-facebook-like-button-to-buddypress-profiles-and-activity-stream-items/
not at all. we are talking about posts not profiles or activity streams.
But as @Svenl77 already stated, you have to taylor the code in order to add dynamic URL for forum posts or whatever. The article uses bp_activity_thread_permalink() for activity stream updates and bp_user_link() for user profiles.
I think that by adding the parameter for forum posts it will work there. Unfortunately, I do not know which parameter it is.
Edit: searching http://phpxref.ftwr.co.uk/buddypress/nav.html?_functions/index.html I found bp_the_topic_permalink(). Not sure if it is the correct template tag tho…
I’d like to put this on forums, groups, events, etc…is there a list of template tags somewhere?
In the phpxref link I posted before you can find them. Good luck understanding them tho, seems chinese to me…
Here’s the group one to use: bp_group_permalink()
Here’s the code I used to add a facebook like button to the group header:
<iframe src="http://www.facebook.com/plugins/like.php?href=&layout=standard&show-faces=true&width=450&action=like&font=arial&colorscheme=light” scrolling=”no” frameborder=”0″ allowTransparency=”true” style=”border:none; margin:1px 0px -12px 0px; overflow:hidden; width:450px; height:30px”>
If U can find the template tags for forum posts, groups, events, post them here please
Sociable for WordPress 3.0 works on BP.unfortunately Like button is on pro version only. On the other hand Facebook share still works.
@svenl77 You said your using it for groups, i tried but it breaks my theme? Did you have any problems? I take it you have it in the group header, think I could look at your code mebe?
Iv’e tried placing the iframe just about everywere..
EDIT: was the unclosed iframe
@antonrsa ye ta, I forgot to close the frame >.<
If some ppl didn’t know, you can change action=like to anything you want, so it could be action=recommend and so on.
tried to add facebook like to profiles, activities etc.
always face same problem:
error: Page could not be reached…
however, in error description it always shows correct url and user’s “like” seems to be accepted, but is not displayed at his facebook page.
there are a lot of topics re this issue in internet (like replace & with &), but no one seems to solve the issue.
maybe someone has some solution for BuddyPress?
I was able to add facebook like button to activities (simple facebook script to entry.php). Know experience is that like button in activities slows down www a lot.
Is there any way (where to add script) to have like button only in single view of activity (permalinks)?
think it won’t make so big load on www, but can not understand how to achieve this…tried adding of div (idea was of display:none in list of activities), nothing works. is it possible at all?
Do not use widgets that make use of iframe or script tags in a loop! Very bad load performance like you said!
Unfortunately you cannot use something like FB Like without an iframe or script tag as it requires pinging FB for the like count.
Whenever possible, use links instead. The Shareholic API can help:
There are probably other similar APIs out there as well.
Best Plugin for FB-Like: http://www.gb-world.net/like-button-plugin-for-wordpress/ or @wordpress.org: https://wordpress.org/extend/plugins/like-button-plugin-for-wordpress/
Do you Need all the features that facebook offers? This plugin is just about the closest you will get, and I am pretty sure their next update will mimic facebook like features:
thanks for replies,
what about displaying facebook like box in profile for every member, this shouldn’t affect load performance a lot, shouldn’t it?
if I will take this plugin
will this code do the trick (?):
- The topic ‘Facebook like for BuddyPress’ is closed to new replies.