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 :)