Facebook just introduced their new Facebook Send button that allows you to share content as a Facebook message to select friends or groups on Facebook.
I promised in my article announcing the Facebook Send button that I would figure out how to integrate it into WordPress – and to keep my promise, that’s exactly what I’ve done.
With WordPress, you have always make sure your include your content loop (think that’s what it’s called) as the HREF= reference. Otherwise, you won’t technically be sharing the web page you thought you were.
Anyway, below is the code to integrate the Facebook Send button into WordPress, or any other web page for that matter:
<div id=”fb-root”></div><script src=”http://connect.facebook.net/en_US/all.js#appId=181727651875642&xfbml=1″></script><fb:send href=”<?php the_permalink(); ?>” font=””></fb:send>
I highlighted in the red the key element of this code. Notice how for the href= reference it’s actually the WordPress PHP code for the content loop.
This is the necessary step required in order to add your Facebook Send button to your individual posts, and have the Send functionality work properly for individual posts.
Let me know if you have questions… thanks!