Facebook XMPP Chat API send Message PHP

牧云@^-^@ 提交于 2019-11-30 19:36:53

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!