从 windows live 获取个人资料图片
我可以通过以下方式获取用户信息、联系人、朋友windows live api 正确。
但是当我根据以下说明请求用户个人资料图片时:
注意要将 GET 调用重定向到用户图片的 URL,您可以 调用 /me/picture 或 /USER_ID/picture。
https://apis.live.net/v5.0/me/picture ?access_token=MY_ACCESS_TOKEN
它响应 null,事实上我已经为 window live 设置了个人资料图片。
很奇怪的是,我可以获得除用户图片之外的所有信息,但是当我使用 Windows Interactive SDK 获取用户图片时,它会响应我正确的图片 url。
问题是什么?
I can get user infomation, contacts, friends through the windows live api correctly.
but when i request for the user profile picture according to the following note:
Note To redirect a GET call to the URL of a user's picture, you can
call /me/picture or /USER_ID/picture.
https://apis.live.net/v5.0/me/picture?access_token=MY_ACCESS_TOKEN
It responses null, in fact i have set a profile picture for window live.
it is very strange that I can get all the information except user picture, but when I use the windows Interactive SDK for user picture, it response me the right picture url.
what is the problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这就是我所做的。我确实即时编辑了这段代码,所以我希望语法是正确的。
Here is what I do. I did edit this code on the fly so I hope the syntax is correct.
也许晚了...但对其他人仍然有用...如果您有实时用户 ID,则不需要访问令牌。试试这个:
当然,您必须将 USER_ID 替换为您尝试获取图片的名称...然后您可以添加首选尺寸:
小(获得 96 × 96 像素的图片)、中 (180 × 180) 或大 (360 × 360)
Maybe late... but still can be useful to someone else... You don't need the access token if you have the Live user id. Try this:
Of course, you must replace the USER_ID with the one you trying to get the picture... then you can add the preferred size :
small (to get a 96 × 96-pixel picture), medium (180 × 180), or large (360 × 360)