views:

182

answers:

2

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

A: 

You should look into the Facebook Developer Wiki. This will have answers to all questions like this.

Filip Ekberg
i need code example.... because i am beginner
Srinivasan
There are several code-examples on their site, just have a look around, they have absolutely everything you need! Check the beginners guide.
Filip Ekberg
Why was this downvoted?
Filip Ekberg
A: 

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
Why the downvote? It is working code that answers the question.
Pat James

related questions