Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get data from a facebook page wall or group wall for use on personal website

I want to connect to public facebook page or group and list all entries from the wall on a personal website. I will use PHP on my server so that would be the best solution for me. Or javascript.

Could anyone explain or perhaps give a working code on how to do this? Or just all steps nessesary for making this?

If its possible to handle information about person, date, description ... for each post, that would be great! So my layout could be customized.

Thanks for helping me out here!

like image 889
user412264 Avatar asked Aug 05 '10 18:08

user412264


People also ask

What data can I get from Facebook API?

The Pages API allows apps to create and manage a Page's settings and content. Using this API, an app can create and get Posts, get Comments on Page-owned content, get Page insights, update actions that Users are able to perform on a Page, and more.

Can someone see what Facebook groups I'm in?

Visible: Anyone can find the group in search and other places on Facebook. Hidden: Only members can find the group in search and other places on Facebook. Keep in mind that public groups can only be visible.

How do I get Facebook Feed API?

To get a list of wall stream items, do an HTTP Get to http://graph.facebook.com/me/wall?access_token=ValidUserAccessToken for the current user. To get a list of home feed stream items, do an HTTP Get to http://graph.facebook.com/me/home?access_token=ValidUserAccessToken for the current user.


2 Answers

You need to run FQL on stream table and provide id of a page or group you are interested in as source_id (fb docs have some explanation and examples). Once you get stream data you can dig deeper and get user who left this post or any other data you need again through FQL.

There are many ways of running FQL - it could be done in JS API, PHP API, or through old REST API.

like image 152
serg Avatar answered Oct 07 '22 19:10

serg


use the facebook graph api urls that they provide

python code using simplejson parser

keyword="old spice"
searchurl='http://graph.facebook.com/search?q='+keyword
resp=urllib2.urlopen(searchurl)
pageData=resp.read()
json = simplejson.loads(pageData)
posts=json['data']
for p in posts:
    postid=p['id']
    username=p['from']['name']
    posterimg=p['icon']
    comment=p['message']
like image 35
JiminyCricket Avatar answered Oct 07 '22 19:10

JiminyCricket