-2

I am developing a facebook application using IFrame. how to add share option in my application.

skaffman
  • 398,947
  • 96
  • 818
  • 769

1 Answers1

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