I need to get a page's posts. But only page's posts, I don't want to get users posts on that page .For example
673049752787143/feed returns me https://www.facebook.com/147078515339869/posts/666313296749719 this post too. But I don't need this. Is there a way of doing this ?
I found my answer./{page-id}/posts shows only the posts that were published by this page.This is what I am looking for. Thanks.
This FQL should give you the info you want:
select post_id, message, attachment from stream where source_id="147078515339869" and actor_id="147078515339869"
As far as I know there's no way to do this with normal Graph API requests.
Related
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 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
I need to pull the 'Posts by Others' from my Facebook Page and display them on my site. Spent the afternoon fiddling around with the API and was able to see posts made by the page, but not others. Any ideas?
Steve, I just found another solution, you can use the Graph API using FQL.
Just make a call to the following:
https://graph.facebook.com/fql?q=SELECT post_id, created_time , app_data, type, actor_id, target_id, message FROM stream WHERE source_id = YOUR_PAGE_ID AND actor_id != YOUR_PAGE_ID&access_token=YOUR_ACCESS_TOKEN
If you need more variables, you just need to put them after SELECT, and you can check them out here: https://developers.facebook.com/docs/reference/fql/stream
On iOS, you don't need to put the access token in the query. To check how to do it with the latest iOS SDK, see my answer here: https://stackoverflow.com/a/14357179/675486
Got it, they are in the 'feed' field along with posts by the page. I was hoping for something that would just give posts by others, but I can filter out the ones posted by the page.
How get my OWN comments, likes, actions just like my wall's recent activity shows for me or same way how my friend's feed work (it shows - "somebody likes a photo/video/anytng")?
Even more simple question: how to get all of news feed objects? Not only posts returned by API /posts, /home, /feed etc. And not only basic likes returned by API /likes. I need "friend1 commented ...", "friend2 likes photo", "friend3 and friend4 are now friends".
All of them.
I have fully checked access_token. Don't care about language/sdk.
Need your thoughts.
It looks like this is not possible. Very sad.
http://forum.developers.facebook.net/viewtopic.php?id=79350
You should check out facebook Graph API Docs: https://developers.facebook.com/docs/reference/api/
It has everything you're looking for.
Is there an API call, and if so, which call to get the 'posts to my wall from myself and others' on Facebook? It seems like it could be filtered out of the Facebook stream API, but it's not clear how that works to me.
This link seems to imply it's possible:
http://developers.facebook.com/news.php?blog=1&story=225
You want to do an FQL query like this:
SELECT actor_id, message FROM stream WHERE source_id = <user id> limit 50
You will probably want to select a few more fields, you can see what is available here: http://wiki.developers.facebook.com/index.php/Stream_%28FQL%29
Here it is.
Profile feed (Wall): https://graph.facebook.com/me/feed?access_token=...
https://developers.facebook.com/blog/post/465
You can publish stories to people who like your Open Graph Page the same way you write a Facebook post from your own wall. The stories appear in the News Feeds of people who have clicked the Like button on the Open Graph Page.
You can also publish using our API. If you associate your Open Graph Page with a Facebook app using the fb:app_id meta tag, you can publish updates to the users who have liked your pages via the Graph API.
First you need to get an access token for your app.
Check out the blog post, it covers everything you need.