I'm having a little bit of trouble getting a lists of posts of a page on facebook...
I'm using the url to get the posts of the page
string.Format("{0}/posts, pageid)
But I cant take the unpublished posts.. It only gets the published posts... Is there any permission I have to use... or some other parameter? I also tried like this
string.Format("{0}/posts?is_published=false", pageid)
... Didn't work...
Can someone help me?
Try the following
<pageId>/promotable_posts?is_published=false&fields=<the fields that you want>
at Facebook Graph API Explorer
Promotable posts include unpublished posts as well as regular posts. To get only unpublished posts, set is_published to false.
Fields are just comma delimited field names ex: fields=message,created_time,comments
Docs/source
Related
I'm using Facebook for many years, and I've liked and commented a lot of friends posts (status, photos, etc). The problem is that I didn't pay attention to that these posts were "public" or "for friends only". As a result, a person who is not a friends of mine can now see all these contents using a request of Graph Search like:
Photos liked by USERNAME
Posts liked by USERNAME
Posts commented on by USERNAME
...
Of course I could remove likes and comments one by one from the Activity log, but it would take several months... I could also use the Toolkit for Facebook available on Chrome, but unfortunately it only proposes to remove ALL likes or comments, of any kind, whereas I want to do it only for public ones.
Edit: This Chrome pluggin is actually a fake, don't use it!
Is there a way to do it with Graph API?
This post seems to mention there isn't, but I'm not sure. I found this post for instance.
Edit: #CBroe confirms "Facebook has recently removed the ability to (un-)like objects in the name of the user" so I guess the latter link is obsolete?
Admitting we've retrieved the posts or comments ID, for instance by parsing the html response of the Graph Search result, then:
Is there another way to launch a request to FB which unlikes or removes posts/comments?
What do you think about it?
Thanks!
I have suitation, where i have to get all the posts of Particular HashTag of Facebook. eg #ILovePhp . I have done some R&D and got my own profile hashtag posts/comments in format of JSON. But i want all the Posts of the particular HashTag(i.e a user who is not friend at all to me in facebook still he posted some message using the hash tag #ILovePhp) . I want to get all the posts in Facebook related to a particulat HashTag. Please help me.
Public Post Search has been removed, there is no way to get all posts of a particular hashtag anymore. You can read more about that in the changelog.
Hi,
As title, in my facebook group, I need to retrieve only post without comments.
I see the search box and notice that searching something will give an url with
`?query=Word%20Search`
and maybe there is a way to search post without comments by url.
Thanks for help!
You must use the Graph API to retrieve data from Facebook. There is example code how to get the group feed in the docs: https://developers.facebook.com/docs/graph-api/reference/v2.2/group/feed#read
You canĀ“t filter by posts without comments, you need to do the filtering on your own after getting the posts.
I'm trying to build an app using facebook's JS SDK and Graph API, and got a little confused in process. The idea is simply to take every post user have created on his timeline. As listed in docs to do this you need to call feed connection, to get an array of post object representing posts users make to their wall.
The thing is when using standard request to get last 30 post (with read_stream permission)
FB.api('/me/feed?limit=30&format=json', function(response) {
//operations on response.data
}
in response graph api returns not only the timeline posts user made, but also some of comments on other peoples posts. So it seems feed doesn't return just "The user's wall." posts, as written in doc, but all things user posted. Request to */user_id/posts* is giving pretty much the same result.
The confusing part is that user text posts to his/hers timeline and comments on other people's posts have the same type of "status". The difference between them is that timeline post has it's content in "message" field and comment stores text in "story".
So my question: Is there a way to sort only timeline posts made by user, within a request itself?
So after facebook updated it's docs it is now clear that you need to call /{user-id}/posts to show only the posts that were published by user.
Call to /{user-id}/feed on the other hand returns the feed of posts, including status updates and links published by user, or by others on user's profile.
More about so called "derivative edges" here: https://developers.facebook.com/docs/graph-api/reference/user/#edges
I'm using https://graph.facebook.com/JellyBelly/posts (with an access token) to get all the posts on a page's timeline. However, I'm getting only posts made by the page itself.
How can I also get posts by others?
Could it be that my query also returns posts the page made on other pages/users? I'm not sure it does, but want to know if my query is supposed to only retrieve posts from this page's timeline?
/PAGE_ID/posts give the Page's own posts as described at https://developers.facebook.com/docs/reference/api/page/
To get posts by others you need
/PAGE_ID/feed
or in your case
/JellyBelly/feed