开发者

login to facebook chat using asmack on android with the new access token

开发者 https://www.devze.com 2023-04-08 19:19 出处:网络
I have a FB chat client developed for Android. I\'ve been using facebook android-sdk to obtain the access token from a user. Using asmack, user was logged into the chat.

I have a FB chat client developed for Android. I've been using facebook android-sdk to obtain the access token from a user. Using asmack, user was logged into the chat. Token was in the form: 226409362971500|3b29bc82baa7901a9baca042.4-72793766|9eb417f06fc376897222938295a0dd0c The code I used was:

XMPPConnection xmpp = new XMPPConnection(config);
SASLAuthentication.registerSASLMechanism("DIGEST-MD5", SASLDigestMD5Mec开发者_开发问答hanism.class);
SASLAuthentication.supportSASLMechanism("DIGEST-MD5", 0);
xmpp.connect();
xmpp.login("226409362971500", "3b29bc82baa7901a9fbaca042.4-72793766|9eb417f06fc376897222938295a0dd0c", "Application");

Now it seems that Facebook has changed the token format. I have tried logging in with the old token, but I always get XMPPException. I've tried loggin in with the new access token: xmpp.login(token, "Application"), but still no luck.

Any idea how to solve this?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号