I want to fetch all the comments from last 5 hours, also this data includes the User data who has commented, time and post id.
I checked the official API call but need to define the post id
[post_id]/comments
Also checked the comments API, it is also asking for object id
{object-id}/comments
Is there any way to fetch all latest comments made on the page?
Related
Right now I am using Instagram API Platform with the "Public Content
- capabilities to read public media on a user's behalf" rights for my app. As it is stated on the website, it will be deprecated on December 11, 2018 and they are pointing to the new Instagram Graph API.
I went through the documentation but could not find what I need. I would like to know if it is possible with the new API to:
Get all posts info (user that posted, the number of followers, caption, likes count and the media itself). With the Mentions API from Instagram Graph API you can get all posts where your Business account is tagged #account, but they require media_id which I don't have, how do I get it?
Get all posts with a specific hashtag, of a specific user (non-business account) within a timeframe. From the comments it is clear that this is not possible for now. Still hope to get an answer to my first question.
I would like to know if the above mentioned are possible with the new API and it would be nice if you can point me to the right API. Thank you in advance
but they require media_id which I don't have, how do I get it?
You can get the list of media id's on which an account has been tagged using the tags endpoint.
v4.0/<account id>?fields=tags
Once you have the list of media items in which the account has been tagged, you can cycle through them and return the following fields each media post.
Returnable Fields: caption, comments, comments_count, like_count, media_type, media_url, owner — The ID of the user who owns the object., timestamp, username
With the owner ID of the post you might be able to look up more of the fields you are looking for, but you will likely run into some permission issues.
I am trying to collect data about a post on facebook from its graph api. I am able to get all the other information (like comments, when the comment was created, who created it, etc etc) but i am not able to find the timestamp on the reactions. That is i want find out at what time (and date) did the user add the reaction. Does facebook have this information? If yes, then how do i get that information using graph api?
Does facebook have this information?
Most likely they do.
If yes, then how do i get that information using graph api?
You don’t, because they do not provide that information via API.
For a page you manage you could set up a webhook for the feed endpoint; that will get you updates for everything that happens on the feed - new posts, new comments, new reactions ... You’d have to filter out the reactions on your end, and then you could record them in your database with a timestamp that should be close enough. (That will only work for new reactions though, and not already existing ones.)
Yes , you can get details of comment by:
https://graph.facebook.com/{page-id}/{post-id}/reactions?access_token={page_token}
I am retrieving posts using facebook api. Adding a field from gives the detials of post owner. But according to Documentation (https://developers.facebook.com/docs/graph-api/reference/v2.9/profile) the profile may be a user/page/group. How can i get only the posts by page in the same api call.?
Unfortunately, this is not possible for posts request. Usually it is done by using "filtering" parameter. But as per documentation https://developers.facebook.com/docs/graph-api/reference/v2.9/page/feed, "filtering" is deprecated for this request.
How to read Facebook comments based on updated time through API?
I tried "since" and "until" but both are reading the data based on created time.
for example let us assume a user created a post on his timeline two days back and someone commented on the post today. If I try to read the comment done on today using the following query /me/feed?since=2014-09-08 it doesn't return anything because the created date is two days back.
There's unfortunately no way to query the Graph API concerning the upate timestamp IMHO. since and until reference the created_time, as you said.
If you have a Graph API v2.0 app, you could theoretically use FQL to query by comment creation timestamp. Have a look at the comment table at https://developers.facebook.com/docs/reference/fql/comment/ and the field time. I guess you'd have to in conjunction with the stream table to get the post_is list.
To be able to use FQL you'll need an app which is an Graph API v2.0 app. And FQL will only work until April 30th 2016.
In one of our requirement using fql we are collecting posts from fb page.
I have to identify deleted posts from the page to remove those post from our storage based on the fb data usage policy.
I tried to get deleted post_id using is_hidden but it is not showing deleted post_ids.
The only option i have is to keep a track of all post and comment ids.
Please let me know if their is any other way to get all the deleted posts and comment ids using some API's or any tool.
Thanks in advance.