I am trying to implement OAuth 2.0 authentication to Hotmail (see http://msdn.microsoft.com/en-us/library/live/hh243647.aspx#authcodegrant for details) in the beta version of my website. I checked many times my code and everything seems correct. Anyhow when I request the access token with
file_get_contents($url, false, $context);
I get false as a result. Printing
$http_response_header
this is the answer I get:
array(10) {
[0] => string(24) "HTTP/1.1 400 Bad Request"
[1] => string(23) "Cache-Control: no-store"
[2] => string(16) "Pragma: no-cache"
[3] => string(19) "Content-Length: 115"
[4] => string(30) "Content-Type: application/json"
[5] => string(25) "Server: Microsoft-IIS/7.5"
[6] => string(24) "X-WLID-Error: 0x80049D66"
[7] => string(40) "PPServer: PPV: 30 H: BAYIDSLGN3C054 V: 0"
[8] => string(35) "Date: Mon, 18 Nov 2013 16:44:40 GMT"
[9] => string(17) "Connection: close" }
Can anyboby point me in the right direction to debug this?