简体   繁体   中英

php sdk - Facebook to gather fan page posts

I am trying to gather the last posts on my fan page to update on my website using the php SDK, I have the following code but it returns an empty array, is there something I am missing? It doesn't seem obvious to me how this won't work, I have tried for literally days now and still get no further following other tutorials etc..

require_once("fcbk/facebook.php");
$config = array();
$config['appId'] = '********';
$config['secret'] = '*********';

$facebook = new Facebook($config);
$pageid = "*********";
$pagefeed = $facebook->api("/" . $pageid . "/feed");
var_dump($pagefeed);

Thanks for all your help.

I've had the same issue, people seem to have solved it here :

Solutions is basically use FQL to filter last entries, get each post_id and retrieve each post usind another call passing all these IDs

check this post here :

Facebook FQL. Which is the easiest way to get all page changes in one single query ordered by date/time?

it worked for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM