Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instagram no longer provides follower count #1

Open
GFBsoul opened this issue Jan 26, 2020 · 4 comments
Open

Instagram no longer provides follower count #1

GFBsoul opened this issue Jan 26, 2020 · 4 comments

Comments

@GFBsoul
Copy link

GFBsoul commented Jan 26, 2020

Instagram no longer lists follower count in the url that social media counter parses.
I think we need a new approach. This should be possible with the Facebook developer credentials.
I'm not a coder, so I'm afraid I can't provide any solution.

@paulfp
Copy link
Owner

paulfp commented Jan 27, 2020

Ah yes you're right, it's a shame! I'm planning to pick this project up again later this year so will try to find a new solution. I'm not confident about the Facebook approach though because they have to approve API access for the app (and they refused for this one previously) just to view a follower count for a page, which seems crazy to me as it's hardly private info.

@GFBsoul
Copy link
Author

GFBsoul commented Jan 28, 2020

I'm glad you are picking the project up again!
I might not be able to code the thing, but I can always help out to try and find a good source for the data.
I'm also in the process of getting something approved through Facebook developers. But it seems like way too much work for a project like. You would like to get this thing up and running within a day.

@fenau88
Copy link

fenau88 commented Feb 5, 2020

i saw that the code is under "userInteractionCount" in the sourcecode of the page
i hope this helps

@fenau88
Copy link

fenau88 commented Feb 7, 2020

We found a solution, change this with the complett instagram part, not the best solution but it works

// Get Instagram followers
if(!is_null($instagramUsername)) {
$url = 'https://www.instagram.com/' . $instagramUsername;
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$output = curl_exec($ch);

preg_match('/userInteractionCount\"\:\"(.*?)\"/', $output, $followerCount);
$instagramFollowers=$followerCount[1];

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants