instagram-api | simple app using instagram 's api to pull a users | Plugin library
kandi X-RAY | instagram-api Summary
kandi X-RAY | instagram-api Summary
A simple app using instagram's api to pull a users most recent photos taken at their current location.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of instagram-api
instagram-api Key Features
instagram-api Examples and Code Snippets
Community Discussions
Trending Discussions on instagram-api
QUESTION
The Instagram image ratio requirements are:
- 1:1
- 4:5
- 1.91:1
- 16:9
Readed here and here. The documentation also says:
(...) Advise the app user to try again with an image that falls withing a 4:5 to 1.91:1 range.
Althought the documentation doesn't say, I know for a fact that publishing a photo with 1:1 ratio works.
So I would like to check if the image uploaded meets the requirements and if not resize to meet them (either by downsizing or upsizing). I'm using Laravel with Image Intervention library.
To check the aspect ratio, I'm using the following code:
...ANSWER
Answered 2021-May-07 at 12:18Solved.
The code to check the aspect ratio was not correct. To check it properly all we need to do is divide the width for the height and see if it fits the range of Instagram requirements.
QUESTION
I would like to know if there is a way to get engagement for a month (ex. get total engagement from current date minus 30 days) for an Instagram post in the Instagram Media Insights API or total engagement from a month from Instagram User Insights API.
As of now from the IG Media Insights, it seems you can only get cumulative engagement (see snippet below taken from IG Media Insights API:
...ANSWER
Answered 2021-May-03 at 15:40For IG Media Insights you can only see lifetime metrics. If you wanted a monthly breakdown you would have to build a mechanism to query the lifetimes every month and calculate the delta to track monthly change.
For IG Account Insights you can use metrics which offer days_28
period or use the since
and until
filtering.
QUESTION
I'm trying to get all related media to my hashtag #Corona which is identified with ig-hashtag-id: 17843934877037015 so i'm sending my GET Request: GET graph.facebook.com/17843934877037015/recent_media?user_id=myUserID
It's supposed to work like it's shown on the facebook documentation here: https://developers.facebook.com/docs/instagram-api/guides/hashtag-search but i'm getting empty Data back as Json Result.
ANSWER
Answered 2021-Apr-26 at 21:57There is an active bug causing this. A fix should be landing soon. Please subscribe to the bug report below for updates; https://developers.facebook.com/support/bugs/307613840758756/
https://developers.facebook.com/status/issues/471343314132946/
QUESTION
I can't find correct video .mp4 format what will be support by Instagram. Any body did something like this? .Supported Video Requirements.
I tried .mp4 ratio 1:1, 4:5, 16:9 in response Unsupported format.
What is means? container for video? Help please
...ANSWER
Answered 2021-Apr-12 at 06:21My browser refuses to load https://104.131.59.122/uploads/my_images/gallery_429/im_295_1617796300.mp4
, because of the untrusted certificate.
Facebook is strict about proper SSL as well, so you will either have to use a plain HTTP URL, or make your SSL setup use a valid certificate, issued/backed by a trusted authority.
QUESTION
I follow the Getting Started Guide to implement Facebook Login with instagram_basic
and pages_show_list
.
pages_show_list
works. But instagram_basic
permission keeps failing with the error message.
Invalid Scopes: instagram_basic. This message is only shown to developers. Users of your app will ignore these permissions if present. Please read the documentation for valid permissions at: https://developers.facebook.com/docs/facebook-login/permissions"
The Instagram account is a business type. I've linked the Instagram account with a Facebook page which I am the admin.
The Facebook Developer account email address is the same as the Facebook account.
This is my code asking permissions
...ANSWER
Answered 2021-Apr-06 at 06:28It is important which app type you choose when setting up your app, different app types have access to different sets of features.
https://developers.facebook.com/docs/development/create-an-app/app-dashboard/app-types
The “Consumer” type should have access to Instagram Basic Display API, according to that list.
pages_show_list
will require the “Business” type though.
QUESTION
I need to send a POST request to the Instagram Basic API with Flask.
This is my code:
...ANSWER
Answered 2021-Feb-02 at 01:49Where did you find that you need to serialize POST request parameters to json
? You'll get JSON response, sure, but you don't need to serialize request parameters.
Try just to pass dict_to_send
itself as data
parameter:
QUESTION
It seems that there's no way to upload an image from command line or to make a post to instagram from command line
Looking at the API docs here https://developers.facebook.com/docs/instagram-api/reference/media under the "creating" section it explicitly says that "This operation is not supported".
...ANSWER
Answered 2021-Jan-19 at 06:14Instagram never offered an API for publishing, they always wanted you to use their App for sharing, with all the included features (filters and stuff).
So there answer is no, there is no API for it.
QUESTION
We are building a mobile app on behalf of a corporation and the API needs to be able to return the corporation's Instagram feed. We have found that implementing what should be a simple requirement incredibly difficult.
We need to retrieve the following Instagram post data from the corporation's feed:
- image url
- caption
- url to post
- timestamp
With this in mind we identified that we need to use the Instagram Graph API which means there are strict requirements around permissions.
Note: We are open to using any method that returns us the required data.
Using the Instagram Graph API we need to use the following endpoints:
- Media (to get a list of the latest IG Media objects for a user)
- IG Media to get detail about each media object
This works fine but the problem lies with getting a long-lived User Access Token. To get this kind of token we need the instagram_graph_user_media
permission. The Long-Lived Access Tokens documentation says:
Long-lived tokens are valid for 60 days and can be refreshed as long as they are at least 24 hours old but have not expired, and the app user has granted your app the
instagram_graph_user_profile
permission.
How can the app user (the corporation) grant the app the permission? As I mentioned this is for an app on behalf of a corporation.
Any help here would be really appreciated!
Thanks
...ANSWER
Answered 2020-Aug-26 at 14:35Unsure if this will be of any help, but battling exactly the same thing today came across this and it made for some intresting reading https://solrevdev.com/2020/05/28/instagram-basic-display-api.html
QUESTION
I tried the Instagram-Graph-Api because the current Instagram-API will be shut down soon.
I want to retrieve posts, created with a specific Hashtag and read the Username who created that post.
Unfortunately the username-Field is not supported in the IG Hashtag API
You cannot request the username field on returned media objects.
OK, that's maybe a Facebook-Limitation. So I tried to fetch the Details of an object with the IG Media API. This Api works for Media-Objects what I created with my linked Facebook-Account for the Access-Token, but it does not works with other, public accounts.
Facebook wrote:
Fields marked with an asterisk (*) are public fields, which means they can be returned by an edge using field expansion.
And the username-Field in the documentation is wrapped with an *
. So I think it's a public information to what we should have access to?
I do not found any limitation on facebook saying that the IG Media Api only allows to retrieve Elements from Pages where my Access-Token is authorized to, is this currently a limitation because my Facebook-App was not reviewed by Facebook?
This is the Graph-API-Call what I made:
GET https://graph.facebook.com/v7.0/18142822621010864?user_id=17841402377690736&fields=id%2Cusername&access_token=
And this is the response what I get:
...ANSWER
Answered 2020-Jun-29 at 09:44Ok did a lot of research on this one last night. And simply put, Facebook locked down their api pretty hard.
You are not able to see any specific of a media item not owned by yourself.
You are not able to see any comments when your are not tagged or mentioned in the post
You are not able to get the username of media found via hashtags for example.
You should be able to see replies on your comments added to public media you do not own.
QUESTION
I'm trying to figure something out...
As most of the 'old' API has been shut down, I've taken a look at the Graph API. I would like to retrieve the list of followers of a specific user. For the life of me I can't figure it out... is this really not possible anymore? The Business Discovery API is limited to only business accounts (as is the whole Graph API for now), but even that only seems to be able to retrieve the followers_count, not the actual followers.
https://developers.facebook.com/docs/instagram-api/business-discovery
What I can't wrap my head around: With all these limitations of the Graph API, how is it that services like HypeAuditor.com are still up and running? How are they getting their data, if the API is so incredibly limited?
Maybe someone has some insights..
...ANSWER
Answered 2020-Mar-21 at 17:51Instagram API was deprecated as April 4th 2018 (You can read all of the change log here https://www.instagram.com/developer/changelog/) and this is all because privacy issues landed on Instagram as so many developers misused the API to retrieve user data massively using user's private key.
Now, you can still use Instagram API but only limited to your own user (since Instagram only leave this endpoint available for you). If you want to get other user's data (for example Justin Bieber's follower, following, post count, etc.) you can use Instagram Private APIs made by developers by reverse engineering the Instagram app. If you choose to use Instagram private API, you need to be careful, because you will have bigger limitation of maximum request in some period of time (from my experience, about 100 request of pulling user data per-5 minutes or so).
You need to note that Facebook don't want you to you access other people's data by deprecating most of it's API endpoints.
Facebook currently is developing new Instagram API for awhile called Graph API. But if you don't have any products in a production state, your application might be rejected (read here at When To Submit
section https://developers.facebook.com/docs/apps/review/). By using this API, you can get all of your demographics data (limited to your own user) by connecting your Instagram and Facebook account.
This is a reference to a good Instagram Private API I ever use:
- PHP (https://github.com/mgp25/Instagram-API) Taken down, explanation below.
- Python (https://github.com/LevPasha/Instagram-API-python)
If you just need basic data like:
- Simulating Instagram search bar
- Basic data such as name, Instagram handle, follower count
there is API endpoint for public use by Instagram. You can use this link format:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install instagram-api
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page