请求时未给出 XMPP 照片类型
我们正在尝试使用传输从我们自己的 ejabberd 服务器实现 facebook 聊天。但是当我们请求联系人照片时,它给出了 binval 但没有提供照片类型。任何人都可以帮我解决这个问题吗?
编辑
为了回答后续问题,这是我发送到服务器的请求:
var imgcard = $iq({ to:name, from:connection.jid, type: 'get', id :'avatar'+name})
.c('vCard', {xmlns:'vcard-temp' })
connection.sendIQ(imgcard, getImg);
响应是:
<body xmlns="http://jabber.org/protocol/httpbind">
<iq xmlns="jabber:client"
to="[email protected]/24581935361290171300602628"
from="[email protected]"
id="[email protected]"
type="result">
<vcard xmlns="vcard-temp">
<desc></desc>
<photo>
<binval>/9j/4AAQSkZJRgABAQAAAQABAAD/9sAQwACAQEBAQECAQEBAgICAgIEAwICAgIFBAQDBAY...
</binval>
</photo>
</vcard>
</iq>
</body>
我得到了 binval 但没有得到图像类型。谁能告诉我我犯的错误吗?
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="[email protected]/24581935361290171300602628"
from="[email protected]"
id="[email protected]"
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 JAXL 库 检索连接帐户的 vCard,我收到以下响应,其中确实有
image/ jpeg
节点附加到它。您从 Facebook 聊天服务器到底得到什么响应?
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.What exactly do you get back in response from facebook chat servers?