這裏任何反應是我的代碼:不要用Instagram的API
<?php
function fetchData($url){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
$result = curl_exec($ch);
curl_close($ch);
return $result;
}
$result = fetchData("https://api.instagram.com/v1/users/search?q=majoe_47&access_token=[hidden]");
var_dump($result);
$result = json_decode($result);
foreach ($result->data as $post) {
// Do something with this data.
}
?>
輸出:
{"meta":{"code":200},"data":[{"username":"majoe_47","bio":"Breiter als der T\u00fcrsteher","website":"http:\/\/www.facebook.com\/majoeduisburg","profile_picture":"http:\/\/photos-a.ak.instagram.com\/hphotos-ak-xfa1\/10584773_1460870534165160_603268483_a.jpg","full_name":"Majoe","id":"256143447"} [..more code ..]}]}
爲什麼:直接鏈接bool(false)
輸出我沒有得到任何反應? :/
你應該刪除您的訪問令牌!剛剛爲你做了;) – 2014-11-05 14:43:10