Getting started with publishing to users streams

Jul 6, 2010 at 7:51 PM
Sorry folks, I'm very very new to this so I apologize if I missed the obvious discussions on the Wiki that answer this. I have created an APP, got an Application key and Secret key. Eventually I wish to push posts to users of my facebook app via a standalone app (not a web app). To start I decided to call api. friends.getUserObjects() but of course it fails because the uid or SessionKey is not initialized. Where do I get either? Thanks for your patience
Jul 6, 2010 at 8:17 PM
Is it true that I need to generate a "permanent session key" for "offline access"? If so can anyone point me to the documentation that tells you how to do that?
Jul 11, 2010 at 11:07 PM

Actually I have found that there is no longer a permanent session key, but one that lasts approximately 24 hours now.

First off you do need to make sure you select 'Desktop' application on Facebook as that will provide a longer session expiry on your keys.

Next thing to do is get the source for this project, and not the compiled binaries. The FacebookService component (at least I think that is what it is called - but haven't used it for a month or so after writing my own [to be released in yet another upcoming - read: a couple of weeks] codeplex API wrapper) will need to be rewritten to instead include a handler for the DocumentCompleted event of a Winforms WebBrowser and NOT the Navigated event on a WPF WebBrowser.

This way you will be able to retrieve the access token from the URL passed during authentication. I would provide code for doing so, but sadly I am lacking time and haven't used this library for some time... It shouldn't be too hard for you to work out though (famous last words!)



Jul 12, 2010 at 4:51 PM

Infinite session keys, aka non-expiring session keys or permanent session keys, certainly do still exist.  I use thousands of them every day.  Prompt your user for the offline_access extended permission.  Personally I use the javascript client library to prompt for permissions as it is less flaky and better supported than this SDK. 

Jul 13, 2010 at 12:31 AM

Awesome :P

Now I need to implement that in my library ;)

Jul 13, 2010 at 5:14 AM

Hi Patja - do you have examples on how to use the offline_access permission with the Javascript SDK?

Could you please send me some examples throught private mail? Thanks a lot


Jul 14, 2010 at 7:35 PM
I'm in the same boat. New to the sdk and I have a dll that needs to post messages to our users's FB status' so any example on the offline_access permission use would be extremely helpful and appreciated! Thanks.