0
votes

I would like to make a PHP application in which a user can Login to Instagram and it will display their user ID, profile photo, name, etc.

It looks like all the old Instagram API stuff is now no longer supported and Facebook's API is the one to use, however when I go to https://developers.facebook.com/docs/instagram-basic-display-api it clearly says "Instagram Basic Display is not an authentication solution. Data returned by the API cannot be used to authenticate your app users or log them into your app."

With that being said I just want the user to click "Apply with Instagram" and the Instagram app/website to pop up and the user enters their login info and my PHP web application gets the ID, profile photo, name, etc. Is that still possible? How is that different from an "authentication solution"?

I have been searching for a guide on how to do this but I can't find any using the new API. Can someone link to one? Thanks!

1

1 Answers

1
votes

If you want to gather Instagram profile data you'll need to use Facebook's Graph API.

When you have the right auth and scope permissions (see below) you'll call:

`https://graph.facebook.com/${instagramiId}?fields=profile_picture_url%2Cusername%2Cname&access_token=${access_token}`

Important to note:

  • Instagram must be a business account - free and easy to do via the Instagram app.
  • The Instagram account must be linked to a Facebook Page.
  • Authentication occurs by OAuth via API Graph.

Also, you'll need to apply for scope permission at Facebook: instagram_basic