3

i am trying to make a facebook chat application for my website using facebook XMPP, Spark or SparkWeb and java. im not know how to start work for it. i am make application for facebook in php and dont know how to authenticate users to my app. please help me for this topic. give me reference or link so i can make this app.

Thanks in Advance.

zero323
  • 322,348
  • 103
  • 959
  • 935
Amit
  • 61
  • 2
  • 3

2 Answers2

2

Ignite Realtime(developer of Spark) provides an library called SmackAPI. You can use it to implement your own client and integrate it into your website.

SmackAPI

To use the Facebook XMPP chat you need to know some information:

Host:chat.facebook.com
Port:5222
Username: myfacebookuser@chat.facebook.com
Password: myfacebookpassword
  • 4
    Facebook does not allow XMPP authentication with username and password anymore. You can only authenticate over OAuth 2.0 for XMPP with their X-FACEBOOK-PLATFORM SASL mechanism. see: http://developers.facebook.com/blog/post/2011/09/09/platform-updates--operation-developer-love/ – Alex Mar 09 '12 at 18:30
  • Alex, and what's an OAuth 2.0 XMPP client? – Nemo Dec 30 '14 at 22:25
  • @Nemo You need to implement your own Facebook authentication mechanisum, please see my answer for details. – volatilevar Dec 30 '16 at 15:27
0

You need to extend Smack's SASLMechanism to implement the Facebook authentication mechanism. BTW, Spark (you mentioned) is an XMPP client, which uses Smack library.

Community
  • 1
  • 1
volatilevar
  • 1,626
  • 14
  • 16