Way to show user's news feed?
I'm having idea of mixing a lot of social networks into one. User would log to all social networks they're in throught API and then they would see every new from every network.
Is it possible to take data from user's new feeds so I can build exactly t开发者_开发问答he same as news feeds but on external page?
I'm asking for Facebook only right now
You can use the Graph API to get a user's News Feed. You just need to get an access token and then do a GET request of:
https://graph.facebook.com/me/home?access_token=YOUR_ACCESS_TOKEN
You'll get a JSON response of the user's News Feed. To check it out really fast, just go to the Graph API documentation and search the page for the first occurrence of "News Feed" and click the link to see your own News Feed delivered via the Graph API. You might also find the Graph Explorer tool really handy as you're getting started.
You need to create a feed model that can handle the various types of API data returned from each service.
You can do so by encapsulating the feeds and the services.
Ideally the feed model stores the timestamp when an entry was published, the entries data and the user who authored the data.
For each API service you write an adapter that is able to return the users data in form of your feed model.
You can then iterate over all feeds and combine them with each other by filtering the username, and sort by timestamp.
If i understand your question correctly...There is an easy way to embed the actual facebook feed. Theres a tutorial and download on http://fourgefeed.com . If you have any problems just email the admin he would be more then happy to help.
精彩评论