When changing the presence in Browser (offline/online) in Facebook Chat, the chat system sends the XMPP message in form:
<presence to="-myidhere#chat.facebook.com/adfskjfskjdfh" from="-otheridhere#chat.facebook.com" type="unavailable">
When I send my own presence from non-browser side (xmpp client) to the browser side with exactly same syntax, it seem not to effect. What I am missing here ?
Thanks a lot,
-Mika
It seems like you can't do that with the facebook xmpp implementation, as they write in the documentation:
Facebook Chat should be compatible with every XMPP client, but is not
a full XMPP server. It should be thought of as a proxy into the world
of Facebook Chat on www.facebook.com. As a result, it has several
behaviors that differ slightly from what you would expect from a
traditional XMPP service
There's an open bug on this matter: XMPP: can't change availability, and also this thread also talks about it: Xmpp chat invisible presence.
Also, don't expect the fb apis to have the same functionality as you get using the fb webpage.
They obviously don't open everything they have to the apis.
Related
From last two days, I have been trying to find out why the hell, Facebook is not sending the message receipts. (same like "Seen" feature in Web Interface).
This is XMPPMessage I am sending to Facebook Chat XMPP Server. But Facebook is in no mood to return the receipt or acknowledgement of the message. If you can guys can guide me, it will be really helpful.
<message type="chat" to="-XXXXXXXXX#chat.facebook.com" id="E32DB9A2-8D0F-4BEC-87DF-299102CC4ABF"><body>Helll</body><active xmlns="http://jabber.org/protocol/chatstates"/><request xmlns="urn:xmpp:receipts"/></message>
I'm using Jitsi on client side and ejabberd on server.
It seems that the chat sessions are specific to clients, i.e. if I'm logged in to the same account from 2 different clients, there will be 2 separate sessions, and one can't see what's happening in another.
Is it possible to share the sessions for the same account on all clients? Like Skype or GTalk.
If yes, is it a server configuration or client?
Thank you.
I think what you're looking for is XEP-0280 Message Carbons. Basically the server takes care of relaying the chat to all of your online resources so that you have the same chat session across all devices.
You even get chatstates from all of your other resources so you can infer whether or not you should show an unread IM notification to the user on your resource or not. You'll need client and server support for this, and it looks like ejabberd has implemented it via this module.
I'm using libpurple to connect to the FB chat. The problem is that I do not get online presences from friends who are online the via mobile Facebook application.
But if such a friend sends me a message, I get both the message and online presence for him at the same time.
It looks like this:
(14:23:08) jabber: Recv (ssl)(191): <message from="-mybyddyid#chat.facebook.com" to="myownid#chat.facebook.com/b94353f3_4CE87B53BB319" type="chat"><composing xmlns="http://jabber.org/protocol/chatstates"/></message>
(14:23:10) jabber: Recv (ssl)(188): <message from="-mybyddyid#chat.facebook.com" to="myownid#chat.facebook.com/b94353f3_4CE87B53BB319" type="chat"><active xmlns="http://jabber.org/protocol/chatstates"/></message>
(14:23:11) jabber: Recv (ssl)(166): <presence from="-mybyddyid#chat.facebook.com" to="myownid#chat.facebook.com/b94353f3_4CE87B53BB319"><x xmlns="vcard-temp:x:update"><photo/></x></presence>
So I am wondering whether it's my fault or the limitation Facebook Chat implementation.
I think there will be a delay for presence updates. Maybe you can check this out asking your friends not to send a message and waiting for the presence to change. From the facebook chat developers page [1] it seems that there will be a delay after which the presence will get updated when you change it.
Also, from the same page, one of the limitations is that the facebook chat server doesn't support presence probes. An XMPP server sends presence probes to contacts if it doesn't already have the presence information of the contacts after the user logs in and sends the initial presence (see section 5.1.1 of RFC 3921 [2], and section 4.3.1 of RFC 6121 [3]).
If the server cant send presence probes, it may not have the presence information of the contacts. I dont know how the facebook chat server was implemented, but I am guessing that when the contact does something (like sending a message/updating the presence), the server assumes that the contact is online and sends the presence. (I may be wrong here, someone correct me if I am!)
References:
[1] http://developers.facebook.com/docs/chat/
[2] http://xmpp.org/rfcs/rfc3921.html
[3] http://xmpp.org/rfcs/rfc6121.html
I'm still not quite sure what XMPP is. However I understand it is a protocol which drives many IM services such as FB and GTalk.
What I'm asking is, is it possible for FB accounts to chat to other XMPP accounts (e.g. GTalk) ? Like #hotmail.com emails can email #gmail.com (decentralized) rather than only hotmail.com to hotmail.com etc.
Thanks
Sadly not. At least currently. Facebook does not federate, meaning it does not make or accept connections to or from other XMPP servers.
Of historical note is the fact that Google did not originally federate gmail.com. They enabled this 6 months after they launched Google Talk. There's hope for Facebook yet. Maybe.
Facebook does not provide an XMPP server, just an XMPP API, so it's not possible to have all the operations available at a XMPP server.
As you can see from this link
Facebook Chat should be compatible with every XMPP client, but is not
a full XMPP server.
I am writing a chat support application that connects to an XMPP server using the SASL Anonymous mechanism. When a user opens my website in their browser, using Socket.IO and NodeJS the server will initiate the anonymous connection with my XMPP server.
This is all working fine. I can connect and communicate with the browser, and it is very cool.
The support team connects to the server using Pidgin. I'd like to be able to display to the browser when the support techs are typing in Pidgin. I set up chat state notifications to work with the browser using AJAX and such, however I am having issues with Pidgin/Adium. Everything seems to work perfectly when I connect from iChat. I get 'active' and 'composing' chat states when the tech is typing. For some reason, however, both Pidgin and Adium are not sending these chat states to the browser client. I've made sure that the proper setting is enabled, as the chat states are being sent between two Pidgin users.
I read something about sending a stanza to report which features a client supports, but the Pidgin client never attempts to request this from the browser.
What am I missing here?
EDIT: I guess I should add that the anonymous browser client is initiating the chat with the Pidgin user, which may be part of the problem here.
Does your client implement XEP-0115, and claim support for the http://jabber.org/protocol/chatstates feature, as specified in section 4 of XEP-0085?
Once you implement that, you'll merely need to deal with libpurple's bugginess.