Facebook chat integration using XMPP

I want to integrate FB chat with my website using SMACK. Is there any sample code available in java for establishing the connection, sending / receiving test messages? The FB developers page (https://developers.facebook.com/docs/chat/) has sample PHP code, but need something in Java.

Help much appreciated.

THanks!

Setup to communicate with non-circuitous xmpp accounts.

Then prepare for the masochism of f*book:

Consider XMPP evangelism. Invite f*book users to escape Auschwitz style privacy and embrace other than least common technology. XMPP servers can provide fine grained privacy controls via XEP 0016

http://xmpp.org/extensions/xep-0016.html

optionally

http://xmpp.org/extensions/xep-0186.html#priv

http://xmpp.org/extensions/xep-0126.html

For less insecurity employ OTR

http://www.cypherpunks.ca/otr/index.php#docs

http://www.cypherpunks.ca/otr

employ sasl s.c.r.a.m. where possible

https://datatracker.ietf.org/doc/draft-melnikov-httpbis-scram-auth/

You might also enjoy cryptocat2.

https://project.crypto.cat/documents/

https://project.crypto.cat/documents/spec/spec2.pdf

Consider configuring your domain to provide

OSS@rk.tld

as email, SIP URI, JID

SIP SIMPLE

http://datatracker.ietf.org/wg/simple/charter/