I had tried the graph api comment function to access comments from a page post. However, the data that I obtained is only comments text without the details of user such as username & id. If I want to get such information, is there anything I have to do?
Related
Is there a way with graph facebook to search specific text content in the message of a user's posts? The assumption here is that the user id and access token is already available as well as all applicable permissions (ie. the user_posts permissions, etc..).
I read through the search feature on graph:
Facebook Graph Docs-Advanced
The following graph explorer example was provided:
GET graph.facebook.com/search?
q={your-query}&
type={object-type}
The table that lists the available types in the link provided is very limited (place, placetopic, ad_*). Is that the full list of possible types? Can we use POSTS or user posts as a type. I couldn't find the right syntax anywhere.
My goal is to retrieve a user's posts based on a specific message tag or text in their post message. Currently, the only way I know how to do this is highly inefficient. I would have to do the following:
Get user's full list of posts
https://graph/facebook/com/{version}/{userID}/?fields=posts&access_token={token}
Run a coded query to get the posts I need and discard the rest
Thanks in advance.
i want to get comments and sub comments from facebook is it possible through their api or are there any alternatives from where i can do it .
I want the comment , date and if possible location of the user
You cannot get a user's location, but you can get the comment and date/time.
Docs can be found here https://developers.facebook.com/docs/graph-api/reference/v3.3/comment
Access would either require manage_pages and a page token valid for the respective page or Page Public Content Access feature approved.
From the documentation it seems like '{post_id}/?fields=from' should return the author of a page post, but it just returns the page that posted it.
I want the page user that posted it, which you can see if you look at the posts on the website. ie "Published by User name"
From https://developers.facebook.com/docs/graph-api/reference/v3.2/post
it says that from provides "Information (name and id) about the Profile that created the Post. If you read this field with a user access token, it returns only the current user."
My reading is that should provide the user name/id but when I use it I just get the page name.
You are looking for the admin_creator field.
Quote from the same page you already referred to:
The admin creator of a Page post. If the Page has only one admin, no data will be returned. Requires a Page Access Token and the business_management permission.
I have a Facebook comment and I would like to get the user ID of the author of the comment. I am able to get this information when the comment is posted on the page that I own with this query:
https://graph.facebook.com/v2.11/comment_id?fields=from&access_token=access_token
However, the same does not work when I am accessing a comment that is not posted on my own page, the from field is never returned. Is it possible to get the author of a comment that is posted on a different page?
Is it possible to get the author of a comment that is posted on a different page?
No, that information is not available to you any more.
https://developers.facebook.com/docs/graph-api/changelog/version2.11#gapi-90-pages:
/page/* — User information will not be included in GET responses for any objects owned by (on) a Page unless the request is made with a Page access token. This affects all nodes and edges that return data for objects owned by a Page.
If you are using a development account you cannot get the from user details of a user who comments on your posts. You can however create test users from your developer account, login with the test account, comment and retrieve their from details.
I want to retrieve the posts on a page's wall but only of a particular user. I am unable to query the graph api with filter. Please help
There is no such filtering available. If you need this, you will have to do the filtering on your end.
You will either have to go through the page's feed and check the from field of the posts for the user id, or through the user's posts (requires that you get user_posts permission from the user first) checking the to field for the page id.