Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6681141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:33:23+00:00 2026-05-26T04:33:23+00:00

I have a FB chat client developed for Android. I’ve been using facebook android-sdk

  • 0

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", SASLDigestMD5Mechanism.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 logging in with the new access token:

xmpp.login(token, "Application"),
but still no luck.
Any idea how to solve this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T04:33:24+00:00Added an answer on May 26, 2026 at 4:33 am

    After a bit of research (php example on the official FB documentation is really good), I came to a following conclusion:
    1. xmpp connection must use ssl
    2. in a response, session_key must be replaced with access_token

    In short:

    ConnectionConfiguration config = new ConnectionConfiguration("chat.facebook.com", 5222);
    config.setSASLAuthenticationEnabled(true);
    config.setSecurityMode(ConnectionConfiguration.SecurityMode.enabled);
    XMPPConnection xmpp = new XMPPConnection(config);
    SASLAuthentication.registerSASLMechanism("X-FACEBOOK-PLATFORM",SASLXFacebookPlatformMechanism.class);
    SASLAuthentication.supportSASLMechanism("X-FACEBOOK-PLATFORM", 0);
    xmpp.connect();
    xmpp.login(appSecret, accessToken, "Application");    
    

    SASLXFacebookPlatformMechanism is my class which extends from org.jivesoftware.smack.sasl.SASLMechanism

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have developed a small chat client using WPF. In each chat window, it
I have developed a Flash based chat client that displays messages posted by users
I have something similar to an online chat client. When one user sends a
I am developing chat client which can connect to Gtalk and Facebook.I am using
I wanna build my own chat client using xmpp on android to chat with
I have been working on a (relatively) simple tcp client/server chat program for my
I have a client interested in a real time chat application for a SharePoint
I have developed a basic Chat application in Java. It consists of a server
I have a chat client that continuously polls a server and fetches new messages.
I'm building a chat server with .NET. I have tried opening about 2000 client

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.