Prompt for extended permission and publish to the stream

May 8, 2009 at 11:51 PM

Hi,

I've developed an iFrame application and i'd like to pubish to the user's stream (a Picture and some text with links).

Actually it's not possible to do that with the Toolkit.

So i've used this code but i get an error due to the extended permission wich has not been set.

                Dictionary<string, string> param = new Dictionary<string, string>();

                param.Add("method", "Stream.publish");

                param.Add("message", "Test message");              

                Master.API.SendRequest(param);

-> The user hasn't authorized the application to perform this action

It would help me a lot if someone could provide some code for my iframe application to prompt for user permission before trying to write in his stream.

Thanks

Yann

May 11, 2009 at 5:26 AM

Hi Yann,

You can try the code in this page: http://wiki.developers.facebook.com/index.php/Extended_permissions (Facebook Control)

Or you can use this code: http://wiki.developers.facebook.com/index.php/JS_API_M_FB.Connect.ShowPermissionDialog (javascript prompt)

Hope this helps! :)

Lance Lim