我希望在我的项目中显示着名Instagram用户的列表及其关注者数量和个人资料图片 有没有可能的方法我只能通过帐户ID获得实时关注者的其他帐户数量? (我正在使用javascript,jsp,ajax开发)。 请帮助!
答案 0 :(得分:0)
请试试这个,
$userID = "miketyson";
$myToken = "***some_valid_access_token***";
$userURL = "https://api.instagram.com/v1/users/" . $userID . "/?access_token=" . $myToken;
$fgc = url_get_contents($userURL);
$jsonUser = json_decode(json_encode($fgc));
//now, we have all information about user.
$bio = $jsonUser->data->bio;
$website = $jsonUser->data->website;
$mediaCount = $jsonUser->data->counts->media;
$follows = $jsonUser->data->counts->follows;
$followedby = $jsonUser->data->counts->followed_by;
echo "There is ".$followedby." followers of ".$userID;
我现在没有有效的访问令牌,但过去我开发了类似于Instagram.com的网站:)