How to send content to the instagram profile of any user? - facebook-graph-api

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

Related

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.

Is it possible to get the Instagram profile picture and other basic details?

I'm trying to get the details of the user using the access_token from the Instagram APIs, Instagram Basic Display API and Instagram Graph API. What I found is the details are bit messy and by going deep into it I'm not able to conclude the final result as I want.
What I got to know during the implementation is that Instagram has stopped the public APIs. does that mean apart from getting auth-token then had stopped everything?.
I have even tried the Instagram Basic Display API which is only giving the access of 4 fields account_type, id, media_count, username. Is it possible to get any other field from the same API?
If so How do I get the profile picture of the user and other basic details of the Instagram user?
any help will be appreciated
Currently, the API endpoint for retrieving a user's profile information only allows for the retrieval of the 4 fields you listed above. This is, up to now, all that has been made available for retrieval through the me endpoint of the Instagram Basic Display API for getting a User node.
Until the API developers further extend the API's endpoints and capabilities, you won't be able to use this API programmatically to get a user's profile image.

Credentials to Fetch Account's Latest Images Using New Instagram Graph API?

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?
Now if you want to access Instagram post you have two options
To use Instagram Graph API For Business Account
To use Instagram Platform API For non-business account
Assuming you have business account
Here is link to get started
Note:-
None business account Instagram supports only basic permission
Starting 10/1/2017, all permissions other than the basic permission
will be unavailable to submit for or obtain.
This is what they have to say about Instagram api for non-business accounts
Even on Facebook developers plateform they say
The Instagram Graph API allows you to programmatically access
Instagram Business Accounts
Here is SO thread that discusses about it,
So, in short, it's very hard to use APIs for Non-Business accounts

Instagram API Pulling Images Without Authorization Page

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.

Is it possible to get access token for multi Facebook user?

I created web application using Facebook C# SDK 5.3.2. I can post messages to my wall. But I want to collect access tokens for my friends' Facebook accounts and store them to use later to post messages to their wall.
Is it possible to get their access token with their Facebook account info. I can get access token for myself with "App ID" and "App Secret. Do I need also add application for my friends' Facebook to get this credentials.
You don't need to store access_token for any user, since it's something time based.
Instead ask for publish_stream permission and post messages to their wall using application access_token
From Facebook documentation on publish_stream permission:
Enables your app to post content, comments, and likes to a user's stream and to the streams of the user's friends. With this permission, you can publish content to a user's feed at any time, without requiring offline_access. However, please note that Facebook recommends a user-initiated sharing model.
the only way to get it done, is that your friends login into your application with their accounts and grant you the publish permission (if you want to publish when they are online) and the offline_access permission, to publish in any moment.
You have to think in the big security issue that this situation potentially represents.
Good luck.