Yes, here’s how you do it for items in the activity stream. Open entry.php and then paste this in there kind of around where you see the favorite buttons – probably you want it only available if a user is logged in:
<iframe src="http://www.facebook.com/plugins/like.php?href=<?php bp_activity_thread_permalink() ?>&layout=standard&show-faces=true&width=450&action=like&font=arial&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:px"></iframe>
This will work for you but you should then style it so it doesn’t take up weird amounts of space. I’m writing up a whole tutorial on how to use this with BuddyPress. It will publish tomorrow at 10AM eastern time. I’ll post a link here.
A separate iframe for every single item in the activity stream seems a little… suboptimal.
I’d love to hear another way to do this I’m no expert, just trying things based on the facebook dev documentation.
You can also use XFBML. It is more flexible than iframes, but requires you use the JavaScript SDK. So that’s another option if you don’t like the iframe.
Nah, I just don’t like Facebook.
Carry on!
Here’s the tutorial about how to do that:
How to Add the Global Facebook Like Button to BuddyPress Profiles and Activity Stream Items –
http://wpmu.org/how-to-add-the-global-facebook-like-button-to-buddypress-profiles-and-activity-stream-items/
Thanks Sarah.
I think I prefer to use the XFBML version but I am not completely clear on how to implement the JavaScript SDK. Could you perhaps give me a few pointers?
I have this problem with the position of the frame in the default theme. Someone can tell me how to fix it?
http://img.skitch.com/20100427-mhpbutdq2ebmqukscj3arx3njg.jpg
Thanks!!
I’m having the same problem, anyone?