Pergunta

FB authentication is proper and i can receive messages. Only issue is when sending messages to a FB friend. No error messages or warnings are being shown, but the message is simply not delivered to the FB friend.

This is the string that i am sending

<message xmlns="http://www.facebook.com/xmpp/messages" to="-FB_ID@chat.facebook.com">
<body>my_message</body></message>

Any one having same issue?.

Foi útil?

Solução 3

Issue fixed.

Author replied me:

OK, I haven't done anything with Facebook chat but why are you setting the xmlns?

That exactly was my problem. I was sending the xmpp messages as shown below:

<message xmlns="http://www.facebook.com/xmpp/messages" to="-FB_ID@chat.facebook.com">
<body>dd</body></message>

When I removed the xmlns attribute, everything is fixed :)

Outras dicas

The "from" parameter is missing in your requset. Message format should be like this:

 <message from="-sender_ID@chat.facebook.com" to="-receiver_ID@chat.facebook.com">
 <body>your_message</body>
 </message>

Is this something to do with the 5000 friend limit ? I mean, you are not allowed to have more than 5000 friends on FB, therefore, I'm guessing there is a security issue that stops you posting once you hit that limit ?

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top