Please help me, status updater ( no login window )

Apr 4, 2010 at 5:24 PM

Hi, i need update status from desktop app, but no show the login window, mi code is that:

           Facebook.Session.ConnectSession desk = new Facebook.Session.ConnectSession([APPKEY], [APPSECRET]);
           Facebook.Rest.Api api = new Facebook.Rest.Api(desk);

            api.Session.SessionKey = [SESSIONKEYINFINITE];
            api.Session.UserId = [USERID];

            api.Stream.Publish(status.Text);

 

based in http://facebooktoolkit.codeplex.com/Thread/View.aspx?ThreadId=75412

is wrong, how to solve, thanks, tanks to all

PD: sorry for my English

Apr 4, 2010 at 11:30 PM

Hey,

 

Have you tried to request publish_stream permission?

Master.RequiredPermissions = new List<Facebook.Schema.Enums.ExtendedPermissions>() { Enums.ExtendedPermissions.publish_stream };

 

This code is used for requesting extended permission in webform, don't know how to do that in winform but it might be similar.

Apr 5, 2010 at 4:42 PM

Why don't you try the example from that other post first to see if it works?  I am not sure you can call the simple form of api.Stream.Publish with only the one parameter (status.Text in your example) for an offline scenario.  Try the longer form from that post with actionlinks, media attachment(s) and target user id.  And yes as Lidan notes it is imperative to have offline_access and publish_stream extended permissions first.  You could do an FQL query to verify you have these permissions first.