XMPP with Java Asmack library supporting X-FACEBOOK-PLATFORM

后端 未结 5 1194
栀梦
栀梦 2020-11-29 03:55

I\'m trying to make a Facebook Chat on Android with the Smack library. I\'ve read the Chat API from Facebook, but I cannot understand how I have to authenticate with Faceboo

5条回答
  •  北海茫月
    2020-11-29 04:12

    What do you want to do?

    If you just want to login on FB chat, you connect to FB just like any other XMPP server.

    I would look at and use "Authenticating with Username/Password" from Chat API, wich is supported by Smack. Unless I would like to write an FaceBook-application. Then I would try to login in with "Authenticating with Facebook Platform".

    So, just use Smack to connect to FB chat as you would do with your ordinary Jabber client.

    1. For the username, use your Facebook username. (see http://www.facebook.com/username/ )
    2. For the domain, use: chat.facebook.com
    3. For the password, use your Facebook password
    4. Turn off SSL and TSL
    5. Set connect port to: 5222 (which is the default for XMPP)
    6. Set connect server to chat.facebook.com

提交回复
热议问题