我的代码是
$page_id = '***********';
$access_token = (new FacebookRequest($session, 'GET', '/' . $page_id, array('fields' => 'access_token')))->execute()->getGraphObject()->asArray();
$page_access_token = $access_token['access_token'];
$data['link'] = "http://www.phpgang.com/";
$data['message'] = "You can change it";
$data['picture'] = "http://www.phpgang.com/wp-content/themes/PHPGang_v2/img/logo.png";
$data['caption'] = "";
$data['description'] = "you can change it";
$data['access_token'] = $page_access_token;
$post_url = 'https://graph.facebook.com/' . $page_id . '/feed';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $post_url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFI ELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$return = curl_exec($ch);
curl_close($ch);
如果我发布http://www.phpgang.com/,则会在关注者新闻Feed中显示。但如果我分享任何其他链接,它不会显示在我的新闻源中......
知道为什么会这样吗?
答案 0 :(得分:0)
有一种算法可以决定是否有人出现了粉丝或粉丝,你真的不能强迫它。只要没有错误并且帖子显示在页面上,您就无法做其他事情。很可能会出现一些粉丝,通常是那些与你的网页互动的人。