Search code examples
instagraminstagram-apisocial-mediainstagram-graph-apiinstafeedjs

Instagram Client ID / new requirements of Instagram API


I have been using instafeed on a few projects over the past years, all without to many issues. With Instagrams new API requirements im running into some issues and any help would be just super -

So far I have set up the basic API accsess (generated my ID and accsessToken) -

(so I have completed the docs here - https://developers.facebook.com/docs/instagram-basic-display-api/getting-started)

Im now trying to get my ClientID but cannot seem to find where to do this (given that this chnage is new, allot of the infomation I find online refers to the old way of doing this, which was from:

https://www.instagram.com/developer/clients/register/

However this now returns:

New registrations not supported anymore)

So questions (and again any help here would be really appreciated) -

1) Can you still use instafeed js to show your instagram posts on your site (with all these chnages to the API is it still valid for new accounts)

2) How can I now generate a ClientID?

i.e. (this is from instafeed.js)

var feed = new Instafeed({
    get: 'user',      // <-- new
    userId: 'XXXXXXX <<<< GOT THE CODE',   // <-- new
    clientId: '??????????????? <<< **need this code for it to work**',
    accessToken:'XXXXXXX <<<< Got the code',
    template: '<a href="{{link}}"><img src="{{image}}" /></a>',
    sortBy: 'most-recent',
    limit: '6',
    resolution: 'thumbnail'
});
feed.run();

Any help on this would be amazing - Sorry if I have asked questions in a junior dev way, I am what I am :P

As a last question (and a little cheeky) -

3) what pit holes have you found with regards to posting Instagram posts on your site with the new API settings (im asking this as "you can only know what you know and what you know you dont know") - so just making sure I havent overlooked something.

Thank you in advance, Warm regards, W


Solution

  • Since Instagram doesn't support new developer registrations, you won't be able to get a working clientId for your feed. Instagram's old API is being turned off completely on March 2, 2020, and is in the process of being replaced with the Instagram Graph API - particularly the Basic Display API.

    The 'no new developer accounts' policy also extends to 'no new apps', so even if you had an existing dev account, you wouldn't be able to create a new ClientID anyway.

    So, to answer your questions:

    1. No, not for new accounts.
    2. You can't as far as I know
    3. I'm not aware of a method to embed a user's IG feed in another website via the new API, using only client-side code (which is how instafeed.js works). More detail on that below.

    For instafeed.js specifically, we're investigating whether it's possible/practical to provide a similar result with the new APIs. At this stage, the authentication scheme makes it seem impractical, and there is definitely no mention of 'show my feed on another website' in the examples of allowed use-cases. It may be possible with a server-side application, but not by just dropping a snippet of JS in a page.

    Lastly, I'm speculating here, but my strong impression is that this use-case is not desired by FB/IG. The old API had its permissions tightened continuously before it was finally deprecated. It would be trivially easy for FB/IG to provide a simple 'embed my feed' facility with the new API if they wanted to - my assumption is that they want users on instagram.com or in the app to look at that content, not out elsewhere on the web.