using Facebook api to access recent activity section - facebook

A user's wall has sections titled "Recent Activity" which include links to posts that the user has liked or commented on, plus recently used applications, new friends etc.
Is there a programmatic way to access this information using Facebook api or something else?
I noticed this info isn't included in user feed.
thanks alot

Isn't this the same with user feed? If so you can query the graph API by calling:
https://graph.facebook.com/<facebookID>/feed?access_token=<your access token>
Good luck!

As far as I can tell, this information isn't available through any API that Facebook offers.

Related

Get user's detailed newsfeed(wall) posts in Facebook

I would like to build a project to know users' behavior when they surf facebook website, especially the advertisements showing in their timeline wall. I have learned the basic idea of facebook graph api, knowing how to access the users' information and their feeds. However, I found that the feeds returned by facebook graph api is not "exactly" what user really see when they open facebook url in their browser. First, in graph api, it doesn't show the advertisements posted by sponsors. Second, the feeds returned by facebook api seem only regarding to my own posts(e.g. the photo tagging me, the posts tagging me). So, I would like to know how to access these information to rebuild a testbed that looks like exactly same as the real facebook website to record people reaction to it and continue my research?
Any idea is welcome ^^
This isn't really possible or rather I don't know any API (Facebook/Twitter/etc) that would do this to their third-party developers. The point of the API is to pull user data, not ads.
Also it sounds like you are using /me/posts or/me/feed instead of /me/home

How to get news feed using Facebook graph api?

I want to get my news feed (just as what is shown on facebook home page) using Facebook graph api
https://graph.facebook.com/me/home
However, the facebook api document says that
this is an outdated view, does not reflect the News Feed on facebook.com:
Are there any other ways ?
Thanks in advance
Yes there is
https://graph.facebook.com/[YOUR_ID]/home
Note though that you will get almost everything you see on your news feed by most recent order and not by Top Stories order which is the default view you get when visiting your own news feed.
Also another thing to note is that you wont get promoted stories in the results.
For all wondering if this still works:
graph.facebook.com/[YOUR_ID]/home
You need the permission read_stream for this. But you wont get this permission, because its deprecated.
Unfortunately the endpoint https://graph.facebook.com/[YOUR_ID]/home and the permission are deprecated and dont work anymore since version 2.4, according to the changelog (search for read_stream).
Currently there is no alternative for reading the news feed. Only the user's posts can be obtained.
See this for reference: Get Home feed requires read_stream which is deprecated?

Facebook shows news feed messages that aren't returned by any of the APIs

I noticed that my feedback news feed shows certain posts that aren't returned by any of the API's. (I tried the GraphAPI and the legacy REST API and FQL).
I can see those status updates at http://facebook.com on my news feed and I can also see them in the Facebook mobile app on iPhone and the mobile app on Windows Mobile.
Some of my friends seem to have set a privacy setting. I think it is this one: "How people bring your info to apps they use" - decheck "My Status Updates", although I can't confirm that is the only reason their posts don't show up, it seems one possible explanation.
So, what API are these facebook mobile applications using which returns the same data as the web site ? Is it possible for me to build another facebook client using that API?
Have you acquired the read_stream extended permission? This is required to see all postings. Typically without it you don't see any posts, but I think you can see posts that are marked as being completely public.

Streaming Facebook Pages Wall (not just the pages posts)

I have looked on 100 forums looking for a simple answer for how to stream every post on a Facebook page's wall (not using the like box for just the pages posts, but everyone's posts). I am the admin of the page and I am already using the like box for my posts so I understand that, however the developer pages of Facebook are too confusing for such a simple task. I will be inserting the stream into an HTML page which will be hosted on www.1and1.com so it can handle most, if not all code.
I know it is a lot to ask but is there evem someplace online that will offer plain step-by-step instructions for my specific needs?
If the social plugins they make available aren't sufficient, you could just pull in the feed with the Facebook graph api using the javascript sdk (easiest) or there is probably an SDK for whatever programming language you know. For example, you can see a list of posts on the coca cola page using the Facebook graph explorer:
https://developers.facebook.com/tools/explorer/?method=GET&path=cocacola%2Ffeed
The /page/feed method needs an access token, but you can use the graph explorer to get an offline_access token that you can use to pull the data in. This may eliminate javascript sdk usage though unless you want to first prompt users to authenticate your application. But otherwise you would just parse the json feed that is returned in the url indicated in the graph explorer (and add your access_token to the end of the url).
Here is a good PHP tutorial on how to display a groups feed on a web page. It would be just as easy to display the posts from a page (since you are the admin)
Just replace the group ID with the page ID. Here is a link to the feed for the Facebook Platform feed graph api results. More info on FB Pages here.

Facebook Graph API shows different results in me/home

When I do a GET with my browser (already logged-in at Facebook):
https://graph.facebook.com/me/home?access_token={token}
the results are different than doing the same via a FB app using Facebook C# SDK.
Specifically, what the API is not returning are feeds posted by other applications.
Why can be this happening? Can't an application retrieve updates from other applications even if it has the read_stream permission?
I even requested for additional permissions: read_stream,user_activities,friends_activities,friends_likes,user_likes,read_requests
but nothing has changed.
What I need is to get ALL and the same stories an user would see at his FB news feed.
I use
me/feed
me/posts
me/statuses
me/links
Sample for a page: http://apps.facebook.com/anotherfeed/wallfeed.php uses the /pageid/feed
In filtering for my wall plugin. Even with perms, if a friend has interacted with a post and is not sharing interaction the post will not show in Graph. Technically unless you have perms from all friends, and friends of friends you can not fully emulate the wall feed.
I noticed the results are different according the geo-localisation.
If your server is hosted in another country it might be the reason why