This is a tough one. I've tried everything and still, facebook is telling me "
" (as you'll see).
There might be a problem with the SASLXFacebookPlatformMechanism class. I compiled it myself, despite knowing nothing about Java. Found that class (and lots of discussion around it) on the net.
My Railo script seems to be connecting to Facebook's XMPP server successfully. But when I try to login(), it says "not-authorized".
If you can get it to authorized (I guess use your own facebook token), I will immediately give $1,000 to the first person (or his/her charity) with the answer. Not sure if that helps get this answered faster, but the fact that I'm so desperate hopefully will. :-)
Google the heck out of these java class names and the error message and such. Lots of conversation, with lots of people (in other programming languages) getting it working.
Again, I changed the access_key and apiToken in the example below, for security reasons. So use your own.
Source (please ignore how messy it is... just a lot of notes I've written while pulling my hair out)
<cfinclude template="/functions.cfm">
<cfset application.smack = "C:\www\fandalism\extras\smack4.jar"> <!--- path to smack --->
<cfset application.smack2 = "C:\www\fandalism\extras\SASLXFacebookPlatformMechanism.class"> <!--- path to smack --->
<!---
<cfset foo = createObject("java", "org.jivesoftware.smack.sasl.SASLXFacebookPlatformMechanism", application.smack2)>
<cfdump var="#foo#">
--->
<cfset SASLAuthentication = createObject("java", "org.jivesoftware.smack.SASLAuthentication", application.smack)>
<cfset XMPPConnection = createObject("java", "org.jivesoftware.smack.XMPPConnection", application.smack).init("chat.facebook.com")> <cfset SASLMechanism = createObject("java", "org.jivesoftware.smack.sasl.SASLMechanism", application.smack)>
<cfset SASLXFacebookPlatformMechanism = createObject("java", "org.jivesoftware.smack.sasl.SASLXFacebookPlatformMechanism", application.smack2)>
<cfset UtilBase64 = createObject("java", "org.jivesoftware.smack.util.Base64", application.smack)>
<cfset XMPPConnection.DEBUG_ENABLED = true>
<cfset SASLAuthentication>
<cfdump var=#SASLAuthentication# label="SASLAuthentication">
<cfdump var=#SASLAuthentication.registerSASLMechanism("X-FACEBOOK-PLATFORM", SASLXFacebookPlatformMechanism.getClass())# label="registerSASLMechanism">
<cfdump var=#SASLAuthentication.supportSASLMechanism("X-FACEBOOK-PLATFORM", 0)#>
<cfdump var=#SASLAuthentication.getRegisterSASLMechanisms()# label="getRegisterSASLMechanisms()">
<cfdump var="#XMPPConnection.connect()#" label="connect()">
<cfdump var="#XMPPConnection.isConnected()#" label="isConnected">
<cfdump var="#XMPPConnection.isAuthenticated()#" label="isAuthenticated">
<cfset access_token = "CAACZChsyXig0BAOo">
<cfset apikey = '21054379006221'>
<!---
(apiKey + "|" + sessionKey, sessionSecret, "Application");
--->
<!---
--->
<cfoutput>
<br>
apikey: #apiKey#<br>
access_token: #access_token#<br>
</cfoutput>
<cfdump var="#XMPPConnection#" label="XMPPConnection">
<cfdump var=#XMPPConnection.login(apikey,access_token)#>