1

I have been asked to integrate Facebook Chat to my application using JavaScript only. I cannot use X Facebook platform authentication as it needs a domain URL. So my option is to set up an XMPP chat client using strophe.js via a digest MD5 SASL mechanism.

Regarding BOSH connect manager, http://bosh.metajack.im:5280/xmpp-httpbind. Is this enough or should I configure it in my server? I am using the Tomcat server.

Cœur
  • 37,241
  • 25
  • 195
  • 267
enthusiastic
  • 1,702
  • 4
  • 19
  • 31

2 Answers2

3

Facebook does not do S2S federation, only C2S, so you will have to use that as your XMPP server (or implement something like XEP-0100 at your server). Facebook does not currently support BOSH, AFAIK.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Adam Linford
  • 154
  • 1
  • strophe needs bosh connection manager so if facebook does not support bosh....which other javascript lib can i use?? – enthusiastic Feb 20 '11 at 17:00
  • you will have to use ur own custom bosh connection manager. Any javascript library will have to use this conn. manager if you want facebook chat to work on browser. – Abhinav Singh Feb 20 '11 at 23:50
  • how do i set up my own custom connection mgr??? is there an easier way to integrate facebook chat...I hav been stuck with it for long now – enthusiastic Feb 21 '11 at 05:15
  • You will need to use something like [punjab](https://github.com/twonds/punjab) as a connection manager. Your connection will then operate: client <--(BOSH)--> punjab <--(XMPP)--> facebook – Adam Linford Feb 22 '11 at 16:08
0

from http://developers.facebook.com/docs/chat/

The DIGEST-MD5 SASL mechanism is available to support traditional XMPP or multi-protocol IM clients that are not customized for (or even aware of) Facebook. This mechanism requires prompting the user for his or her password; therefore, it should only be used when necessary. In particular, it MUST NOT be used for any client that:

•Proxies the XMPP connection (the connection must be directly from the user's computer to Facebook).

•Reports messages or any other information about user activity to a third party (including the client developer).

•Integrates with Facebook, or has a Facebook Application ID. If your application does any of the above, you must use Facebook Platform authentication instead.

So, you can't use DIGEST-MD5 with a bosh server but you must use X-FACEBOOK-PLATFORM

Laphroaig
  • 619
  • 4
  • 12
  • 26