使用 API 发帖时我收到:
https://www.facebook.com/weather.warnings/posts/329128793830700
注意标题、缩略图和元描述是如何从事物中丢失的。
以下是我使用的代码。
$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?它说该项目从页面本身提取图片
想法?
最佳答案
您可以通过在数组中传递以下项目来实现:
'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 并抓取和解析数据。
关于php - 使用 API 发布链接不包括图片、标题或元描述 PHP,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11005891/