With the OAuth 2.0 and encrypted access token changes I can't connect to FB chat anymore. The example on FB's chat document shows PHP on the server side, however I开发者_Go百科 need to connect by getting the access_token from the JavaScript sdk.
I took out the sig and session_key parameters from my challenge response, and added the parameter for access_token, setting it to the access_token I get from the JavaScript sdk. I assume the access_token is correct because before Oct 1st it had pipes in it, and now it's encrypted without the pipe symbols. Also looking at my security settings, the xmpp_login permission is being set properly when I initially grant permissions.
No matter what I try my connection attempt fails.
Does anyone have working code where the access token comes from the JavaScript sdk in a browser rather than from the server side?
Got it: Make sure you're also using TLS. In the PHP code example: http://developers.facebook.com/docs/chat/ you'll see how this is handled if you search for $START_TLS
精彩评论