I am developing a facebook application using IFrame. how to add share option in my application.
Asked
Active
Viewed 739 times
1 Answers
2
You need to use XFBML in an Iframe application.
This should work. Put your Facebook application's API Key in and reference your cross-domain receiver file (xd_receiver)
<fb:share-button href="http://apps.facebook.com/your_app" type="box_count"></fb:share-button>
<script src="http://static.ak.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>
<script type="text/javascript">
FB_RequireFeatures(["XFBML"], function() {
FB.init("api key goes here", "path to your xd_receiver file goes here");
});
</script>

Pat James
- 4,348
- 26
- 39
-
Why the downvote? It is working code that answers the question. – Pat James Dec 09 '09 at 15:48