Instagram API Pulling Images Without Authorization Page - web-services

So I was going through Instagram's API and I implemented it. However it isn't as useful as I thought it would be because when trying to get and OAuth2 token a user is taken to a page to authorize them in what looks to be and effort of insuring that the user realizes that they are about to view and share Instagram content with my application. This all makes sense to me although not ideal. You can find it in detail here(Step One: Direct your user to our authorization URL).
Then I saw this press release from a company called Celtra who says they can pull the the most recent images off any Instagram feed and put them in an Ad. I checked it out and somehow they are pulling the images of other companies without this authorization page I am encountering. Basically without page scrapping I don't know how to do this with Instagrams API, and I realize scraping violates Instagrams terms of service. Does anyone have this functionality, where I can pull down images from Instagram and not take a user to an authentication page working legally as I am assuming Celtra is doing? Guidance or documentation on how to achieve this would be ideal.

Instagram recently added an endpoint that will allow you to any instagram account's photos without oauth or needing access_token, you can specify client_id and make API call to get photos.
Just register for an app account at here and add the client_id to this endpoint and make call:
https://api.instagram.com/v1/users/3/media/recent/?client_id=YOUR-CLIENT_ID
You only need access_token to get users' likes, follower feed and to like/comment/follow.
update: you need to have access_token with the new API changes, cannot
access API with just client_id anymore

To do this simply, you could authenticate your app from a dummy profile or your own personal profile and then use the access_token to request the feeds of any account. Then, when an end user goes to use your product, instead of authenticating them, you can just pull content from the Instagram API using your access_token.

Related

How to send content to the instagram profile of any user?

I want to perform write operation on users instagram profile. Is it somehow possible? Using Instagram/facebook APIs or access token or so?
The post API endpoint is private. They only allow a few select third parties post directly to Instagram, if at all these days.
The only thing you can do is open Instagram with the media already selected.
Take a look here

Migrating existing Login flow using Instagram Legacy API to the new Instagram Basic graph API

Our application (kind-of got legacy) has been using IG API to authorize users (by using the uid attribute returned from IG's callback API response) and we have left email as an optional param (safe to assume that there are many users in the application database without email IDs persisted)
With new Instagram Basic Display API (advised), it's mentioned to use Facebook Login for authentication purpose. But I am facing a major problem of identifying existing users now (since the uid will be different).
Also I have a doubt on what will have happen for users having instagram account without linking their Facebook account to it?
I could not find a proper explanation or a documentation for seamless migration for my situation.
Please help with sharing the right resource or guidance to achieve the same.

Obtaining Access Token Server Side Instagram Graph Api V3

What I'm trying to achieve:
Fetch images from my own Instagram business account to display on a website using the Instagram graph api v3.3 by not obtaining a user access token from a client side Facebook SDK login modal because users just shouldn't be doing that to see a simple Instagram feed.
I have the permissions manage_pages and instagram_basic granted(gone through app review). I'm using app_id and app_secret as user access_token parameter value(which may not be the access token Instagram graph api is looking for) as when I tried to fetch any data there is an 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.'" However, I don't need the permission Page Public Content Access because I'm fetching images from my own account. This is also confirmed by the Facebook App Review support.
The query that is used to get the images is as follows:
https://graph.facebook.com/${pageId}?fields=id&access_token=${accessToken}
My access token in this case is app_id|app_secret since I can't access the user access token.
The developer api guide "https://developers.facebook.com/docs/instagram-api/getting-started/" only shows a way to get user access token using the client side Facebook SDK login button which generates a user access token after a visiting user interacts with a modal that pops up to have them login. But again, a simple Instagram image gallery shouldn't require every user that visit the site to log in to their own Facebook account.
I have bugged the App Review support team at Facebook with no real answer. I couldn't join the Facebook developers support group as no one is approving my request to join and I've also tried my best to seek help from the facebook developers support team but I can't reach them. So I'm turning to Stack Overflow to ask if there is any way to display images from an Instagram Business Account without sticking a Facebook login SDK modal on the site.
Thanks so much.
EDIT: After reading #misorude's comment, I'm thinking would adding the Facebook login modal on the website and querying it by logging into my own Facebook account and then capturing my own user access token that is returned by the api and then use that access token for every susequent api calls to fetch images work?

Access profile pictures using Facebook's Graph API v2.3 without user login

Direct access to profile pictures via the Facebook graph API has recently stopped working and appears deprecated. Apparently, this now requires an access token (which requires the user to login to FB first)...
https://graph.facebook.com/{user-id}/picture?redirect=false&type=large
I'm developing a web application in JavaScript, unrelated to Facebook. I would like to offer users the option to use their FB profile picture for posts. They provide their numeric user-id which I save on our server. Until recently, my client app could use the numeric user-id in the above URL to produce a JSON response with a link to the user's profile picture.
Is there an alternative approach to getting a user's profile picture without first requiring the user to login to FB to get a client-side access token?
If They (the users) provide their numeric user-id means that you're using Facebook Login, and they at least gave their public_profile permission to your app, you can just add the App Access Token to the request and it should work.
https://graph.facebook.com/{user-id}/picture?redirect=false&type=large&access_token={app_access_token}
If you don't use Facebook Login, I see no chance to be honest.

Request additional permissions only for specific users in Meteor

I have an application allowing users to sign in using their Facebook and Twitter accounts. I only need a very basic information like their email address and full name. Everything works fine and as planned.
Accounts.ui.config({
requestPermissions: {
facebook: ['email'],
github: ['user:email']
}
});
But, now I need to implement a feature posting to a Facebook page and Twitter on behalf of the admin users only. So, I need to get additional permissions from specific users only.
Admin users are eligible to manage our page at Facebook. The app needs to request additional permissions to be able to post to the page. I wan't to keep those basic permissions for regular users.
How can I accomplish that?
One way you can do is,
If you know that logged in user is Admin, put the re-authenticate button in user-dashboard (or somewhere which makes sense) that will do authentication user of user for whatever permissions as required by application.
This will basically do, oauth with social service like usual and upon completion you will get aceess code and against this code get the re-newed access token from social service. (This is normal , how you basically do the oauth manually) Now, use this access token to post to social services.
For this, you will need to use node modules such as for facebook -fb_graph , for twitter- twiiter
Hope this helps