I am using XMPP for chatting in my iPhone application, I need to retrieve the profile of every user in buddy list, like phone number, street address etc.
How can I get started?
While XEP-54 can be used for this purpose, PLEASE do not spam the network by making vcard-temp requests for everyone on your roster every time your client logs in. Since you haven't told us what client library you're using, all we can do is provide you with the protocol you need to send:
<iq id='v1'
type='get'>
<vCard xmlns='vcard-temp'/>
</iq>
Note that XEP-54 is about to be obsoleted by XEP-292, but it will take several years for that transition to take place.
Related
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 am looking at building an ordering service, this is fine but my question is how to reliably get the order to the shop. It is a fast food shop.
Are there any solid delivery options either via sms/phone or an email service that is pretty much 100% reliable.
Take a look at some of the SMS providers like Twilio who give you web based APIs for sending SMS messages. There is also an API called the OneAPI that is currently available in Canada but will be in other regions soon. You can use this to send SMS messages through a html API.
For email, take a look at some of the providers listed by programmable web, there are a bunch, for example Yahoo lets you send messages via their API.
Yes make sure call back to sender for confirmation,...
check on my DMStar CBuilder6 system.
it fetch filtered email and sms QFree ordering system.
Every minute or so will auto print out onto docket dot matrix printer as soon order received.
https://sites.google.com/site/dmsqfree/tastykebabs
or google it with tasty kebabs qfree
https://sites.google.com/site/dmsqfree/
E C and simple for small retaillers, no register of sensitive personal details needed.
Using an old Nokia Mobile with prepaid $20.00 per year(free sms) connected into PC USB port,...
cheer.
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 have an iphone app where I want to use chat rooms. I've installed an XMPP server (ejabberd) and downloaded the XMPP framework for iOS from google code (http://code.google.com/p/xmppframework/). The server and client work as expected, since I'm able to log in and send chat messages between two users.
However, when I try to create a chat room using the createOrJoinRoom method of the XMPPRoom class (in XEP-0045), I don't get any reply from the server and the chat room is not created.
I've debugged to see what kind of package is sent to the server and it looks like this:
<presence from="test2#beta.bogus.net/mynick" to="muumit15#conference.beta.bogus.net">
<x xmlns="http://jabber.org/protocol/muc"/>
</presence>
I get no error message back but the chat room (muumit15) is not created. At the same time I can use e.g. Adium client to create a chat room and it succeeds. The server has been configured so that every user has a right to create chat rooms.
Any ideas? I even tried sniffing the TCP/IP traffic sent by the Adium client but that was encrypted/compressed/binary so I couldn't see what kind of packages it is sending.
See section 7.2.2 of XEP-0045, particularly Example 18:
<presence
from='hag66#shakespeare.lit/pda'
to='coven#chat.shakespeare.lit/thirdwitch'>
<x xmlns='http://jabber.org/protocol/muc'/>
</presence>
Note that the to address MUST contain a resource, and yours doesn't. The resource is the string after the /, which is used as your nickname in the room. For more information on the XMPP address format, see RFC 6122.
I have created an XMPP chat application for Android and iPhone. While testing the app in jwchat.org, users who are created from iPhone devices are shown as 'stalker', and Android usernames are shown as online / offline. What does 'stalker' mean? Because of this, messages are sent and received from Android to iPhone, but iPhone devices' messages are not recieved by Android devices. Can anyone please help me?
"Stalker" is an unfortunate term that is embedded in the user interface of your client, not a standard part of the protocol. It likely refers to people who are in your roster as type="from", which indicates that they are subscribed to your presence but you are not subscribed to their presence. If you want to change this state, send them:
<presence type='subscribe' to='stalker#example.com'/>
Once they accept with:
<presence type='subscribed' to='you#example.com'/>
You should have each other in the type="both" state on one anothers' rosters.
It sounds like a presence problem on the iPhone app -- that it is successfully logging in/authenticating to the xmpp server, but then failing to send an xmpp presence stanza.
Do you have any traces of the xmpp communication?