【发布时间】:2022-01-27 10:05:25
【问题描述】:
我正在尝试使用以下代码获取用户的粉丝页面帖子,但它给了我警告
Warning: file_get_contents(https://graph.facebook.com/782176371798916/posts): failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request
$page_posts = file_get_contents('https://graph.facebook.com/'.$page_id.'/posts');
$pageposts = json_decode($page_posts);
foreach ($pageposts["data"] as $fppost) {
echo $fppost['message'];
}
那么,获取用户粉丝页面帖子的正确方法是什么?
【问题讨论】:
-
我没有看到
access_token=CAAAA......,访问调用/posts或/feed需要有效的access_token,错误说明了一切
标签: php facebook facebook-graph-api posts facebook-page