Messenger kullanıcı profilini alınıyor (windows live) php içinde sdk'sını bağlamak

0 Cevap php

I am using this example to successfuly make a login connection on windows live platform:
http://code.msdn.microsoft.com/messengerconnect (the oauth handler callback one)

I receive a token and a user id from their api, but I can't seem to understand how to fetch the user profile from these info.
Does anyone know how to do this?
There are examples in MS website, but they are all C# or javascript ones and I have to do it in PHP.

Belirteci ve cid aldıktan sonra ben bu çalıştı, ama bana bir hata verir:

$url_string = 'http://apis.live.net/V4.1/cid-'.$user->getId().'/Profiles/';
echo("<br/>\n".$url_string);
$curl_session = curl_init($url_string);

// build HTTP header with authorization code
$curl_options = array(
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => array(
  'Authorization: WRAP access_token=AuthToken="'.urlencode($_REQUEST['stoken']).'"',
  'Accept: application/json'
  )
);

// setup options for curl transfer
curl_setopt_array($curl_session, $curl_options);

// execute session and get response
$curl_response = curl_exec($curl_session);

print $curl_response;

curl_close($curl_session);

The error is this:
{"Title":"ErrorResource","Code":1062,"Message":"Request does not contain a valid PUID."}

siz beni kullanıcı bilgilerini alarak yardımcı olabilir?

EDIT:
solved the problem by removing the =AuthToken from the authorization and it worked!

Thanks,
Joe

0 Cevap