Getting Other Account's Followers Count By Using Instagram API
I want to show lists of famous Instagram Users with their followers count and profile pictures in my project. Is there any possible ways I can get real time followers count of othe
Solution 1:
Please try this,
$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;
I do not have valid access token now, but I developed a instagram.com like website in the past :)
Post a Comment for "Getting Other Account's Followers Count By Using Instagram API"