views:

449

answers:

2

I have a simple iframe facebook app. I need the app to post content to the current user's wall. I'm doing everything in PHP and JS. Currently, the only facebook-specific PHP I have is to get the current user's ID, and the only JS I have is to get the iframe to size to the contents.

How do I have a dialogue pop up with predetermined content, asking the user to enter any additional text they may wish to enter before publishing to the user's wall? I've looked into FB.Connect.streamPublish() but that requires using Facebook Connect, which is veering away from the whole iframe app thing.

+2  A: 

You were looking in the right place - the Facebook Connect libraries are what you need. If you embed the standard Connect code in an iframe app then it'll set up the user's session transparently by taking parameters from Facebook's iframe tag. You can then use FB.Connect.streamPublish().

The only other alternative would be to get the user to grant the application the publish_stream extended permission and use the stream.publish API call directly. But since the only way to get that permission is through yet another Connect dialogue (or directly in FBML) it doesn't really solve the problem.

Karl B
A: 

Karl, could you give more detail on what "standard Connect code" is, exactly? It's a little hard to tell with all of the outdated documentation that's permeating the web.

Banderon