Getting others' posts on a Facebook page's timeline - facebook

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

Related

How to get the Facebook "HashTag" feeds/Posts etc using the Facebook Graph API ? I want to get all the posts of a particular #HashTag

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.

Fetching posts from a page made only by the page using Graph API

I am trying to fetch all posts from a fan page using Graph API. I can do it in many pages using {page-id}/posts, but it does not work in all cases (example, facebook.com/cocacola). If I use {page-id}/feed, I can get it all, but I will get many user posts too. I could do it with FQL, but since FQL is not going to be supported anymore, I don't want to use it.
I want to get everything the page posts, even if it is a link, photo or share.
Something like this:
graph.facebook.com/{page-id}/feed?from.id={page-id}
The edge /{page-id}/posts will return all posts made by the page.
[1] https://developers.facebook.com/docs/graph-api/reference/v2.0/page/feed

Facebook API How to get a list of unpublished posts

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

Get only timeline posts, from facebook feed request

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

Get Facebook Page Feed and their likes/comments without any permissions

I am trying to get the user ids of all the users who have liked or commented on a status on a facebook page.
I tried using graph.facebook.com/page_id/posts?access_token=...
but it only gives me 2-4 user ids who have liked and their total count, similarly for comments. Is there any way to get all the ids?
According to The Documentation for the 'Post' object
(and verified by me on my own page using the Graph API Explorer tool), these work:
/POST_ID/comments to fetch the comments
/POST_ID/likesto fetch the Likes