Getting basic information from Instagram using PHP

In case you need to grab follower count (or other fields) without logging in, Instagram is nice enough to put them in JSON inside the page source: $raw = file_get_contents(‘https://www.instagram.com/USERNAME’); //replace with user preg_match(‘/\”edge_followed_by\”\:\s?\{\”count\”\:\s?([0-9]+)/’,$raw,$m); print intval($m[1]); //returns “123” Hope that helps. 24 May 2016 Updated to be more tolerant of spaces in JSON. 19 Apr … Read more

post image in Instagram

Yet it is not possible to post image in Instagram like FB or twitter. But this is another way to achieve this using already installed Instagram and if not this will notify user to download app . public void onClick(View v) { Intent intent = getPackageManager().getLaunchIntentForPackage(“com.instagram.android”); if (intent != null) { Intent shareIntent = new … Read more

Instagram Unable to reach callback URL

This problem has now been fixed. If it re-appears, here is workaround that I developed dealing with similar problems with the real-time API over the past couple years. Set your system up to use both the real-time API as well as the search API as a fallback. Ingest data coming through the real-time calls, but … Read more

Instagram API – How can I retrieve the list of people a user is following on Instagram

Shiva’s answer doesn’t apply anymore. The API call “/users/{user-id}/follows” is not supported by Instagram for some time (it was disabled in 2016). For a while you were able to get only your own followers/followings with “/users/self/follows” endpoint, but Instagram disabled that feature in April 2018 (with the Cambridge Analytica issue). You can read about it … Read more

How to open fb and instagram app by tapping on button in Swift

Update for Swift 4 and iOS 10+ OK, there are two easy steps to achieve this in Swift 3: First, you have to modify Info.plist to list instagram and facebook with LSApplicationQueriesSchemes. Simply open Info.plist as a Source Code, and paste this: <key>LSApplicationQueriesSchemes</key> <array> <string>instagram</string> <string>fb</string> </array> After that, you can open instagram and facebook … Read more