Get Facebook Page Wall Stream

17,381

Solution 1

You could use the Facebook php sdk: https://github.com/facebook/facebook-php-sdk It ends up looking like this:

//
include('facebook.php');
$fb_config = array(
        'appId'  => $yourAppId,
        'secret' => $yourSecret,
);
$facebook = new Facebook($fb_config);
$feed = $facebook->api("/{$nameOfFaceBookPage}/feed");

That will give you an array of feed stories.

Solution 2

I assume you created a facebook page for your band and it has url in such format:

http://www.facebook.com/pages/<band_name>/<page_id>

In this case you can read wall posts in json format using Graph API (no login required):

https://graph.facebook.com/<page_id>/feed

Solution 3

If you only want posts from "me", can't you just use the Like Box social plugin and show the stream? This plugin will only show posts from the page owner.

http://developers.facebook.com/docs/reference/plugins/like-box

Share:
17,381
Admin
Author by

Admin

Updated on June 13, 2022

Comments

  • Admin
    Admin almost 2 years

    I want to get the posts (only from the band, not others) from a Facebook Page Wall (its a Band, so no private profile) and publish it on MY own site.

    I hoped to get the Posts as XML or JSON and then parse them. So I wanted to use Facebook as a news System.

    But I didn't find a solution - I don't want to have the user to log in with his account to see anything - it should be just a public stream.

    The only idea I found was to use twitter as an export mechanism, but that's kind of elaborate.

    Does anybody have an idea?

  • Mohammed J. Razem
    Mohammed J. Razem over 13 years
    Is there a way to style the JSON output exactly as it appears in Facebook? And attach interactions (Like, Comment) to each post?
  • Christopher Sparrowgrove
    Christopher Sparrowgrove over 12 years
    To answer Doublethink's question yes there is.. Store the Josn Values (ex. $user->name) into (ex. $name = $user->name;) then design your format around that info.
  • Christopher Sparrowgrove
    Christopher Sparrowgrove over 12 years
    I just tried what Serg said via The Facebook Page for USO Fort Carson graph.facebook.com/160957710611220/feed and I get: An access token is required to request this resource. from Facebook so Thanks for voting down my edit.
  • Igy
    Igy over 12 years
    Use an access token then; if there's no demographic restrictions on the page any access token (user, page or app) will work - if there are restrictions you need to use a user access token for a user that meets the restrictions
  • Admin
    Admin about 11 years
    It gives following error Fatal error: Uncaught OAuthException: (#803) Some of the aliases you requested do not exist: {eyuvadotcom} thrown in C:\wamp\www\fbpage\src\base_facebook.php on line 1254 sorry it worked. i forgot to remove {} Thanks a lot