I would like to implement FB-chat inside a webpage. I looked around in Facebook API, i found out that chat is allowed only using XMPP. Firs
Informations about facebook chat server :
Protocol: XMPP or Jabber
Username: mathvdh
Domain: chat.facebook.com
Jabber ID: mathvdh@chat.facebook.com
Password: <your Facebook password>
Port: 5222
Server: chat.facebook.com
Use SSL/TLS: no
Allow plaintext authentication: no
I think strophe and punjab should be a working combination for fb chat, see here : XMPP library for facebook chat
And I think the schema would be more like :
client webpage/js/strophe <-> yourserver/punjab <-> facebook xmpp chat server
Sabah,
As mentioned in the previous answers the Punjab <-> strophe.js works. I have forked the facebook strophe client here: https://github.com/javierfigueroa/turedsocial and I added an example.
Hope this helps.
I'm trying to solve this problem too. So far I have decided on a set up of:
Jappix mini (uses JSJAC.js library) <-> node-xmpp-bosh on node.js on my server <-> Facebook server.
Jappix mini was hard to find but it seems by far the best open source chat bar so worth mentioning here.
I don't have it all set up yet but will update here if I make progress. The main issue will be how to make JSJAC use Facebook API Key authentication. I can't find any info or examples for that, but I found this plugin for strophe library which maybe can be adapted:
https://github.com/rubenjgarciab/turedsocial/blob/master/strophe-plugins/src/facebook.js
Finally, you cannot include your facebook secret key in javascript (because it's a secret!) so you need to use Facebook REST API auth.promoteSession server-side to produce a session-secret key which can be used in the javascript to sign the X-FACEBOOK-PLATFORM auth request.
Hope that helps, I'll add more if/when I get it working.