2

当使用API​​发布我收到此:利用API帖子链接不包括图片,标题或Meta说明PHP

https://www.facebook.com/weather.warnings/posts/329128793830700

通知如何标题,缩略图和meta描述从缺少的东西。

以下是我正在使用的代码。

$allalert = array 
(
'oauth_token' => 'not pasting this thanks :P', 
'message' => "New $type for $where", 
'link' => $url, 
); 
$sendalert = $facebook->api('/125291287567922/links/','POST',$allalert); 

引用how does one post a thumbnail picture to a Facebook /links object?它说,该项目是直接从网页本身

的想法了吗?

回答

5

你可以通过数组中的下列项目做到这一点:

'name' => "post title", 
'link' => "url to the page", 
'message'=> "message", 
'description' => "longer description", 
'picture'=>"url of the picture", 
'caption' => "Another bit of text" 

这消除了对FB刮板任何依赖外出的URL和刮和分析数据。

+0

效果不错,谢谢 –

+0

不再。 – MPaulo

1

您需要将所需的og标签添加到您的页面。

+0

OG标签在那里......查看链接页面的标题部分。 http://warningweather.com/view/[email protected] –