window live api
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?
Here is what I do. I did edit this code on the fly so I hope the syntax is correct.
var uri = "https://apis.live.net/v5.0/me?access_token=" + accessToken;
var profile = JObject.Parse(new WebClient().DownloadString(uri));
var pictureUrl = string.Format("https://apis.live.net/v5.0/{0}/picture", profile["id"]);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With