I am currently messing about with the Facebook Chat API. I want to send chat messages to my facebook contacts via an App.
Using the example provided by facebook I wa
You should send to socket command with your message. Common message format is
<message from="-sender_ID@chat.facebook.com" to="-receiver_ID@chat.facebook.com">
<body>message body</body>
</message>
So before comment "we made it!" insert function call send_xml with your message template
send_xml($fp, $MESSAGE);
if (!find_xmpp($fp, 'BODY')) {
return false;
}
It's the standard xmpp/jabber message format: See 4.2 on http://xmpp.org/rfcs/rfc3921.html#stanzas-message