XMPP photo type is not given in response when requested
We are trying to implement facebook chat from our own ejabberd server using transports.But when we requested for photo of the contact, it gives binval but not type of photo.Can any one help me out in resolving this issue.
EDIT
In 开发者_运维知识库response to the follow-up questions, this is the request I send to the server:
var imgcard = $iq({ to:name, from:connection.jid, type: 'get', id :'avatar'+name})
.c('vCard', {xmlns:'vcard-temp' })
connection.sendIQ(imgcard, getImg);
The response is:
<body xmlns="http://jabber.org/protocol/httpbind">
<iq xmlns="jabber:client"
to="yummy61@li188-236.members.linode.com/24581935361290171300602628"
from="666346810@facebook.li188-236.members.linode.com"
id="avatar666346810@facebook.li188-236.members.linode.com"
type="result">
<vcard xmlns="vcard-temp">
<desc></desc>
<photo>
<binval>/9j/4AAQSkZJRgABAQAAAQABAAD/9sAQwACAQEBAQECAQEBAgICAgIEAwICAgIFBAQDBAY...
</binval>
</photo>
</vcard>
</iq>
</body>
I get the binval but not image type. Can any one tell the mistake I made?
Using JAXL library to retrieve vCard for connected account, I get following response back which does have <TYPE>image/jpeg</TYPE>
node attached to it.
[16000] 2010-11-09 23:49:47 - [[XMPPSend]] body
<body rid="5674" sid="41bbdfe522c4e1c3a3e1a4cfe20968f1" xmlns="http://jabber.org/protocol/httpbind"><iq type="get" id="7" from="abhinavsingh@chat.facebook.com/jaxl.1289375373_ba14f160_494AE079BF19C"><vCard xmlns="vcard-temp"/></iq></body>
[16000] 2010-11-09 23:49:48 - [[XMPPGet]]
<body sid="41bbdfe522c4e1c3a3e1a4cfe20968f1" rid="5674" xmlns="http://jabber.org/protocol/httpbind"><iq from="abhinavsingh@chat.facebook.com" to="abhinavsingh@chat.facebook.com/jaxl.1289375373_ba14f160_494AE079BF19C" id="7" type="result"><vCard xmlns="vcard-temp"><FN>Abhinav Singh</FN><PHOTO><TYPE>image/jpeg</TYPE><BINVAL></BINVAL></PHOTO></vCard></iq></body>
What exactly do you get back in response from facebook chat servers?
精彩评论