How to use FB.Connect.streamPublish in facebook iframe application?

I am making a simple iframe based framework. I have the following code for the size of my iframe:

FB_RequireFeatures(["Connect"], function(){
  FB.XdComm.Server.init('/xd_receiver.htm');
  FB.CanvasClient.startTimerToSizeToContent();
  FB.CanvasClient.syncUrl();
});

I want to add a link in which a pop-up window will be displayed that will allow the user to publish the image / link attached to the application on the user's wall. To get started, I tried using the following code on the click event:

FB.Connect.streamPublish('');

However, nothing happens. I tried to add:

FB.init(<?=API_KEY?>, '/xd_receiver.htm');

inside the function FB_RequireFeatures , before that, after that ... there is no luck. Nothing happened. Errors do not occur. Nothing. Any ideas?

+2
source share
4

, : ( http://wiki.developers.facebook.com/index.php/Connect/Setting_Up_Your_Site#Referencing_Facebook_Connect_on_Your_Site)

  • xd_receiver.htm
  • FeatureLoader.js.php BODY
  • javascript (, FB_RequiresFeatures ..) .

, :

<script type="text/javascript">
   window.onload = function() {
        FB_RequireFeatures(["XFBML", "Connect"], function() {
           FB.Facebook.init("...my api key...","xd_receiver.htm");
           FB.CanvasClient.syncUrl();
        });
   };
</script>

"XFBML" FB_RequireFeatures xd_receiver.htm, .

, , URL Connect ( Facebook) xd_receiver.htm. , http://www.mydomain.com, , , xd_receiver.htm http://www.mydomain.com/xd_receiver.htm, http://www.mydomain.com URL- .

, Firebug ( ), . , API- Javascript Facebook , , , , Facebook URL- Connect.

, ,

FB.Connect.streamPublish();

, , , . , , .

, Facebook IFrame - , , Javascript, , . , , Facebook IFrame.

0

URL- , javascript. URL- http://apps.facebook.com/yourapp , .

0

@Cyphus

, " ", facebook (apps.facebook.com/myapp). URL- . URL- , URL- Connect, , , iframe facebook, URL- . , facebook.

0

All Articles