Instagram Graph API - get IgMedia likes ie. liked_by - instagram

When working with Facebook's API fro Facebook, one can retrieve an object likes like documented on Facebook Graph API
I'm trying to do the same for Instagram's Graph API, ie. get list of likes on a IgMedia object. Seeing no documentation on this, I tried using the /likes endpoint, but it didn't work.
endpoint = "/" + mediaId + "/likes"
Intuitively, comments can be fetched from
endpoint = "/" + mediaId + "/comments"
I tried inspecting the Instagram web app, and I saw it fetches a list of likes via another (internal (?)) endpoint e.g. /query/ but I couldn't re-engineer this and fetch this endpoint myself from the API.
Is there any documentation on this, or is the likes endpoint still not exposed via the Instagram Graph API? Can this be done?

Related

How to access Instagram Graph API and use Instagram webhooks?

I'm trying to create an app in which I would like to display user feeds from social media apps like Instagram. I want the data to be as live as possible so I tried to integrate Instagram Webhooks. I have created a server side application with Instagram's authentication and a callback url for webhooks through which I want to fetch data from Instagram and then store it in a database.
I have been going through the Official documentation. I was able to get User id, name, comments through Instagram API and I have also subscribed Instagram's webhooks in my meta developer's application. It didn't throw any error but when I like or comment on my post I couldn't get any object in the callback URL. I'm completely new to this so It would be great if someone could explain me how to do this?

How to fetch other users media by Instagram API

How can I fetch other users media through Instagram API, I can easily fetch my media through API. But how can I fetch others users. For fetching my medias I am using
$url = 'https://api.instagram.com/v1/users/self/media/recent/?access_token=' . $token;
But when I try to others users media through username it gives no result.I have also replace "self" with username.But getting no result. I tried many solutions. Is there any way on this planet to get others users media from my access token.
This API deprecated by instagram to fetching other's content.
Here is the detail from Instagram:-
Commenting on Public Content
GET /media/{media-id}/comments (Deprecation not relevant when fetching comments for self media)
POST /media/{media-id}/comments
DEL /media/{media-id}/comments/comment-id
For more details, you can go to page, This is effective from 4th April.
https://www.instagram.com/developer/changelog/

Get images with tag using FB's new Graph API for instagram

Recently, Instagram/Facebook stopped approving apps using their old Instagram API in favor of Facebook's graph api.
I'm struggling to figure out how to migrate of some of the functionality I'm wanting in my app.
With instagram, to get recent images with a given tag, you simply made a request to this URL:
https://api.instagram.com/v1/tags/{tag-name}/media/recent?access_token=ACCESS-TOKEN
Does the Facebook graph api for instagram have that? I couldn't find it in their documentation.
The new graph API does not support all the APIs that the old Instagram API supported. You cannot get images by hashtag and location and any user's posts, like you could with old APIs.
With new graph API you can only access your photos and your insights and comments.
No hashtag posts, other user posts, location posts or follower lists.

retrieving instagram stories data using instagram api

I want to access and retrieve a user's Stories post from Instagram using their Dev API.
I tested after posting a story myself by using https://api.instagram.com/v1/users/self/media/recent/?access_token=ACCESS-TOKEN.
However, that returns an empty object unless I post a regular post.
As far as I am aware the Instagram API does not currently return Stories.
The example response in the documentation for the media endpoint, for example, shows responses for Images, Videos and Carousel items only. The recent media end point documentation doesn't go into much detail on responses.
Media End Point Documentation
It is available only for Instagram Business Account.
See this link for more information: https://developers.facebook.com/docs/instagram-api/reference/user/stories/
The id returned by this endpoint can be used on the same API media endpoint.

Does Instagram has Dynamic feed API

Does Instagram has Dynamic feed API which pulls latest feed automatically similar to twitter API's ? I am looking to build a custom widget to show latest feed of Instagram always shown on top.
You can use the following endpoint to get the most recent media published by the owner of the Instagram account:
https://api.instagram.com/v1/users/self/media/recent/?access_token=ACCESS-TOKEN
You need to pass in the parameters as well:
ACCESS_TOKEN A valid access token.
COUNT Count of media to return.
MIN_ID Return media later than this min_id.
MAX_ID Return media earlier than this max_id.
With this endpoint, the most recent media will be the first to get returned to you. Also, this endpoint requires the owner of the media to be the same as the access_token owner.
You can read more about other endpoints on in the Instagram API Documentation.

Resources