2

I used gloox to chat with my facebook buddy, and the authentication mechanisms is X-FACEBOOK-PLATFORM. Now I use OAuth1.0 facebook sdk, but facebook will change the sdk to OAuth2.0. and I do not know how to sign in to facebook chat with the access token.

now my Facebook Chat Authentication code before connection as follows:

client_.setSASLMechanisms( SaslMechFacebook );

 string key(ini.api_key);

  key += "|" + string(password) + "|" + string(ini.secret_key); 
//password is the session key  facebook returned

client_.setAuthcid( key );

How to change this code to adapt to the OAuth2.0?

Somnath Muluk
  • 46,917
  • 28
  • 204
  • 217

1 Answers1

0

Before Oct 1st access_token had pipes in it, and now it's encrypted without the pipe symbols. You can examples in Facebook-chat-with-OAuth-2.0-example. Or check sample example code here.

Also check accepted solution in question Integrating Facebook chat.

Community
  • 1
  • 1
Somnath Muluk
  • 46,917
  • 28
  • 204
  • 217