Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't send message to FB

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="[email protected]">
<body>my_message</body></message>

Any one having same issue?.

like image 585
Deepukjayan Avatar asked Oct 22 '13 12:10

Deepukjayan


3 Answers

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

 <message from="[email protected]" to="[email protected]">
 <body>your_message</body>
 </message>
like image 67
Jhanvi Avatar answered Oct 21 '22 08:10

Jhanvi


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 ?

like image 1
Hugh Abbott Avatar answered Oct 21 '22 08:10

Hugh Abbott


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="[email protected]">
<body>dd</body></message>

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

like image 1
Deepukjayan Avatar answered Oct 21 '22 09:10

Deepukjayan