开发者

Pull Facebook status feed and parse with PHP

开发者 https://www.devze.com 2023-01-13 13:29 出处:网络
Hey I\'m having trouble finding documentation on pulling Facebook status updates from the public domain. I tried using the Old REST API and the Graph API, and I\'ve hunted for documentation, sample co

Hey I'm having trouble finding documentation on pulling Facebook status updates from the public domain. I tried using the Old REST API and the Graph API, and I've hunted for documentation, sample code, tutorials and forums for something just to start me off, but I can't find anything. All I want to do is grab status feeds from users. I also saw you coul开发者_运维问答d do that by pulling from the RSS feeds, but I think FB shut that down.

This is the closest I got to anything (which came from sample code from another post). I tried substituting in other usernames for "haanmc" but none of the other ones worked:

 <?php

 require '../src/facebook.php';
 // Create our Application instance.

 $facebook = new Facebook(array('appId' => 'XXXXXX','secret' => 'XXXXX'));
 // This call will always work since we are fetching public data.
 // this could be /username or /username/friends etc...
 // see developer api for FQL for examples
 $status = $facebook->api('/haanmc/feed?limit=1');
 ?>

 <p><?php print $status['data'][0]['message']; ?></p>
 <textarea style="width: 95%; height: 100%;"><?php print_r($status); ?></textarea>


Sounds to me like you want the Search API

0

精彩评论

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