Getting JSON Result from Windows Live ID Request

I'm having trouble retrieving all of the JSON from the Live ID API call.

I work through an OAuth2 stream with a Windows Live ID to get profile information (and some related items such as phone numbers and preferred email address). I useperl & Net::OAuth2.

The OAuth2 part seems to be working fine; I can get an access token. What I want to do now is turn it on and get the profile information, which is the point of this authentication / authorization process.

If I just plug the URL back into the browser https://apis.live.net/v5.0/me?access_token=EwA .... I get what I want, it looks like JSON:

{
   "id": "dd62296f10db01bf", 
   "name": "Michael Helm", 
 ....

   "locale": "en_US", 
   "updated_time": "2012-05-03T01:02:59+0000"
}

When I use some perl modules to create a url string, make a request and receive (use LWP :: UserAgent; use HTTP :: Request :: Common;)

what returns as a result of the client-> request is similar to the last part of this JSON above, the part with updated_time, plus some punctuation marks.

What am I missing? What do I need to do to get the whole object?

This method worked before (but with several OAuth 1 providers). I am not very familiar with Microsoft and the Windows Live ID, but the process still seemed simple.

+3
source share
1 answer

As stated above, the JSON module can read and analyze all content, even if the Dumper cannot print it. Thus, there is no problem handling OAuth 2 or the Windows Live API.

0
source

All Articles