We have a wordpress multisite using AddThis for sharing. The only other facebook ap I would like to add at this time is facepile. Most of the plugins with facepile duplicate the sharing. I would like a plugin that is multisite with activation at network. What is the recommendation for the most efficient way to do this.
Paul Lumsdaine answers:
The easiest way is to use the provided iframe code from facebook and drop it into your single.php, index.php or page.php (where you want facepile to show up).
You can generate the code here: [[LINK href="http://developers.facebook.com/docs/reference/plugins/facepile/"]]Facepile for Facebook Developers[[/LINK]]
The code will end up looking something like this (depending on settings):
<iframe src="http://www.facebook.com/plugins/facepile.php?href=YOUR-WEBSITE.COM&size=small&width=200&max_rows=1&colorscheme=light" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:200px;" allowTransparency="true"></iframe>
Probably the best method though is to use the facebook javascript sdk and then simply insert the facepile XFBML into your template, for instance in your single.php file or wherever you want facepile to show.
The full XFBML would look like this:
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<fb:facepile href="YOUR-WEBSITE.COM" width="200" max_rows="1"></fb:facepile>
Let me know if you need any more help.
Kathy Goss comments:
This is the info straight from facebook - it does not answer the multi-site part of the question. Does there need to be any modifications for multi-site?
Paul Lumsdaine comments:
Yes, I was repeating the information that I found in the facebook link... I suppose an addition needs to be made. If you are using multi-site, I suppose you would want the domain name to be different in those examples.
<iframe src="http://www.facebook.com/plugins/facepile.php?href=<?php echo site_url(); ?>&size=small&width=200&max_rows=1&colorscheme=light" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:200px;" allowTransparency="true"></iframe>
Is that kind of what you were looking for? Please let me know and I could help out some more.
Paul Lumsdaine comments:
Alternatively, if you wanted to have one <strong>inside the loop</strong>, for each post/page, you can include the iframe code like this:
<iframe src="http://www.facebook.com/plugins/facepile.php?href=<?php the_permalink(); ?>&size=small&width=200&max_rows=1&colorscheme=light" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:200px;" allowTransparency="true"></iframe>