开发者

Facebook API to retrieve wall feed

I've ne开发者_Go百科ver done any facebook development and am working on a project which I only require to pull out wall stream from a certain user. Is there such an API I could use for this purpose?


Facebook exposes a generic API. You can write your own methods of accessing it, or you can use Facebook's libraries (if your preferred language is available). Check out the following link to get started:

Getting started


Well, if you're happy with JSON, just using the graph API is a good start.

e.g. https://graph.facebook.com/starbucks/feed

Not too hard to pull that down with Python and put the data in a table...


Though this is an old post, still i am putting in my reply. This might be helpful.

I am using php sdk and here is code for getting the users wall posts (includes posts by other users as well)

$facebook = new Facebook(array(
  'appId'  => '101874630007036',
  'secret' => '2090c8d645ae93e7cacee2217cd3dc0c',
));

$user = $facebook->getUser();

// Login or logout url will be needed depending on current user state.
if ($user)
{
  $logoutUrl = $facebook->getLogoutUrl();
} 

else 
{    
    $params = array('scope' => 'read_stream');

    $loginUrl = $facebook->getLoginUrl($params);
}

if ($user)
{    
    $comments = $facebook->api('/me/home'); 
}

here $comments contains the wall post json data.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜