tomwaddington.co.uk

Suggested Share 

Custom XFBML tag to share with the right friends.


Examples

Usage

Including the tag

Head over to GitHub to download the javascript.

In the head of your page, include 'suggested-share.js'.

Finally, add loadSuggestedShare(); at the end of the window.fbAsyncInit block.

window.fbAsyncInit = function() {
    FB.init({
	appId: '...',
	status: true,
	cookie: true,
	xfbml: true
	});
	
	loadSuggestedShare();
};

Rendering

Use the fb:suggested-share tag anywhere on the page. Pass a comma-seperated list of Facebook page ids.

<fb:suggested-share ids="…">
</fb:suggested-share>

By default, the plugin will list all pages referenced by the plugin after the list of names. You can override text by putting text in between the opening and closing fb:suggested-share tags.


Attributes

About

I'm the developer at Cut Out + Keep and I wanted to make it easier to find specific people to share content with. Lots of pages might not be great to share with everyone on my news feed, but by singling out friends who I know will like the content makes it easy to target. These targeted updates help drive traffic to the site. Remember, the plugin lists all of your friends, not just those who've connected previously. You can watch a video of my presentation about the plugin. Feel free to open any bugs / issues over on Github.

Background

The plugin was developed at the Facebook London Hackathon by Tom Waddington, Cat Morley and Tony Daly.