2
我試圖讓ACCES從Instagram的API憑證令牌是這樣的文檔請求Instagram的API存取權限與捲曲
curl -F 'client_id=CLIENT_ID' \
-F 'client_secret=CLIENT_SECRET' \
-F 'grant_type=authorization_code' \
-F 'redirect_uri=AUTHORIZATION_REDIRECT_URI' \
-F 'code=CODE' \
https://api.instagram.com/oauth/access_token
的樣品要求,這是我的代碼
<body>
<?php
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "https://api.instagram.com/oauth/access_token");
curl_setopt($curl,CURLOPT_POST, true);
curl_setopt($curl,CURLOPT_POSTFIELDS, "client_id=MYID&
client_secret=MY_CLIENT_SECRET&grant_type=authorization_code&
redirect_uri=http://localhost/pruebainst/pruebas.php&code=".$_GET['code']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
curl_setopt($curl, CURLOPT_TIMEOUT, 10);
$output = curl_exec($curl);
curl_close($curl);
echo ($output);
?>
</body>
隨着此代碼我沒有得到任何捲曲請求