Not sure if this is possible. I want to grab the latest X stories posted to a facebook page wall and embed them into an external site - preferably with PHP. Something like the latest tweets but with a facebook page.
+1
A:
this is definitely possible using the PHP Facebook API client.
http://wiki.developers.facebook.com/index.php/Stream.get
To do this you will need an API key (obviously).
using the Client Library you'll just need to call:
$stream = $facebook->api_client->stream_get($viewer_id, $source_ids, $start_time, $end_time, $limit, $filter_key, $metadata);
foreach($stream as $wallpost)
{
echo '<pre>';
print_r($wallpost);
echo '</pre>';
}
where
$source_ids = the page
$limit = the limit of posts you want
$viewer_id = the id of the viewer, obviously someone with viewing permission of the wall.
Jayrox
2010-03-08 19:26:47
This seems to be what I am looking for. I havent defined $facebook, is the php library supposed to do this? I'm getting that error
Wes
2010-03-08 20:13:22
Figured it out, had to put my facebook api key and secret key into the inline file.thanks!
Wes
2010-03-08 21:25:48
Sorry, was behind a restrictive firewall at work. Darn thing keeps me from going into facebook's api docs. Glad you figured it out though :)
Jayrox
2010-03-08 23:47:09