我想通过Facebook API获取Facebook页面的Feed。不受支持的获取请求 - Facebook API
把我的一个页面 - 在我的代码中有趣的代码带回数据没有任何问题。
但是,当我尝试加载在我们的一个客户API时,我得到的消息......
不支持GET请求
附上页面的图像权限
我的PHP代码如下....
// init app with app id (APPID) and secret (SECRET)
FacebookSession::setDefaultApplication('','');
$session = new FacebookSession('');
// First Get The Groups' Details...
$request = new FacebookRequest(
$session,
'GET',
'/'.$app_view->app_view_title
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
$page_name = $graphObject->getProperty('name');
// Next Get The Posts...
$request = new FacebookRequest(
$session,
'GET',
'/'.$app_view->app_view_title.'/feed?limit=10'
);
$response = $request->execute();
$object = $response->getGraphObject();
$fbdata = $object->getPropertyAsArray('data');
?>
什么是“$ app_view-> app_view_title”,你调试过吗? – luschn 2014-11-06 09:14:12
嗨@luschn $ app_view-> app_view_title是为Facebook页面设置的一个字符串,例如koodoocreative – StuBlackett 2014-11-06 09:15:14