I'm trying to display a gallery of images on a website for a client. Those images should be fetched from their Instagram account automatically. Simple, right? Well, it used to be...
I can't use the Instagram API, because it's being deprecated: https://www.instagram.com/developer/
So instead, I'm trying to use the Instagram Graph API to get the latest images for the account: https://developers.facebook.com/docs/instagram-api/reference/user/media#get-media
Skip to the bottom for the short version, or keep reading for the long version.
Long Story
Trouble is, I'm having a very hard time understanding how to even get the credentials to interact with this API. As best I can tell, I need to create four separate things first:
- An Instagram Business Account (done)
- A Facebook User (done)
- A Facebook Page (done)
- A Facebook App (done...ish)
I'm not even sure if I need to create all of those things (especially the app), but that's where I'm at now. And I'm trying to figure out what permissions I need based on this page: https://developers.facebook.com/docs/facebook-login/access-tokens#apptokens
I'd think I need an "app access token", and from what I understand I can instead use the app ID and app secret combined in place of the app access token, and that actually seemed to sort of work.
I then tried to get the Instagram ID I need based on the linked Facebook page, which I did with this call (with the real Facebook account ID and the proper token): https://graph.facebook.com/some-facebook-account-id-here?fields=instagram_business_account&access_token=something-here|and-here
The response to that call was:
{
"error": {
"message": "(#10) To use 'Page Public Content Access', your use of this endpoint must be reviewed and approved by Facebook. To submit this 'Page Public Content Access' feature for review please read our documentation on reviewable features: https://developers.facebook.com/docs/apps/review.",
"type": "OAuthException",
"code": 10,
"fbtrace_id": "[redacted]"
}
}
And then I went down a rabbit hole of trying to submit the "feature" for review, but that ended with me running into a catch 22 where it was asking me to have a live working demo of the thing I'm asking for access to. I don't understand how I can have a live working demo when I don't even have access to it yet.
Long Story Short
Long story short, this seems obscenely complicated for something that should be very simple. Maybe I'm just doing this wrong?
What would you do if you were in my shoes in order to gain access to the Instagram Graph API so that you can fetch a few images from a specific Instagram account to display on a website?