我正在尝试使用 facebook graph api explorer 发布到提要(我正在通过它获取令牌)。
通常,当您在提要中手动发布链接时,会创建摘要。当我通过图形资源管理器 api 应用程序发布链接时,它显示为常规链接。
enter code here
$graph_url = "https://graph.facebook.com/".$_POST['group_id']."/feed";
$postData = array(
'access_token' => $_POST['token'],
'message' => $_POST['message'],
'name' => 'name',
'picture' => urlencode ('http://wildfireapp.files.wordpress.com/2010/05/img-payingfbcustomers1.png'),
'link' => urlencode ('http://www.google.com'),
'scope' => 'publish_stream');
$ch = curl_init();
curl_setopt_array($ch, array(
CURLOPT_URL => $graph_url,
CURLOPT_POSTFIELDS => $postData,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_VERBOSE => true
));
$result = json_decode(curl_exec($ch));
curl_close($ch);