How to set up a Facebook Chat API connection when authorizing as a Desktop App
The problem I am facing is that after I authorize my app for current user using http://developers.facebook.com/docs/authentication/ (client-side flow) I can't setup a XMPP connection as I need to know session key开发者_JS百科 to access it. When using server-based flow, the session properties are being sent as a part of access token. And I didn't find a way to get the session key for my oAuth based authentication client-side flow. Please suggest how can I get it.
I'm doing all requests from javascript (Google Chrome extension).
Facebook is actually deprecating the session key. They have just recently (a couple days after you posted the question i believe) updated their authentication method to no longer require the session key. If for whatever reason you still need it you can get it by looking up the auth.promote_session method in the REST API, but that is deprecated and will be removed come October.
If you check https://developers.facebook.com/docs/chat/ you should find that the access token will get you what you need now.
精彩评论