tags:

views:

4053

answers:

3

from the scarcely documented FB api, I have thus far learned that I need to do the following to get the StreamPublish working:

I am making an iframe app

  1. setup xd_receiver.htm. DONE.
  2. put the FeatureLoader.js.php at the top of the body tag. DONE.
  3. configure the api key and xd_receiver.htm. DONE.
  4. configure the connect callback URL. NOT DONE -> what URL should I specify here?

I am unable to use the function. i have a specific link which shuld call for the FB.Connect.StreamPublish function.

can someone please explain the working of this by some example?

A: 

It seems that you have a conceptual error.

Iframe apps are canvas apps, NOT Connect apps.

Canvas apps are applications that work inside the Facebook site, eg: from a tab from your profile. Canvas apps require you to configure a callback URL, which is the URL where your application resides. You shouldn't do steps 1-3 because Facebook will proxy the calls to your application so they can send your application session information about the user (through a POST or GET params).

Connect apps are external sites, like Digg, where you must do steps 1-3, but not step 4. Steps 1-3 are required to establish a communication channel with Facebook.

Please read http://wiki.developers.facebook.com/index.php/Connect/Setting_Up_Your_Site for a step by step guide for installing Connect in your site. After you are done with it, you can call FB.Connect.StreamPublish.

andrerobot
i dont know but the facebook api is made the way it is. it requires the connect features to be used in the iframe apps. please check the docs.
amit
Oops, sorry, I didn't know you could use the Connect API through a canvas app.What do you mean by "Connect Callback URL"? If it is the app callback, this is the URL of your application. If you are talking about the URL you should put in FB.Init(...), this is the URL of xd_receiver.htm.
andrerobot
A: 

In the facebook application settings, the description is:

Your Connect site's main URL.

And that is exactly what it is, the main URL for the site where your app resides.

If your app would've been a canvas app, you could use the FBJS function FB.streamPublish, but in an iframe app you will have to use the FB.Connect.StreamPublish.

More info at http://wiki.developers.facebook.com/index.php/Facebook.streamPublish

Jasper De Bruijn
+2  A: 

Check out this page for complete instructions on setting up Stream Publishing for iFrame apps (or Connect pages) using FB.Connect.streamPublish():

http://thetechnicalexperience.blogspot.com/2010/02/how-to-use-fbconnectstreampublish.html

Michael

related questions