您好我正试图在用户的墙上发布一篇像这样的大文章
我试过这段代码
$post = array(
'access_token' => $row['user_token'],
'message' => 'Hello world ',
'link' => $row['url'],
//'name' => "This is my title",
//'caption' => "My Caption",
//'description' => "Some Description...",
'picture' => $imgurl
//'image' => $row['img']
);
$res = $facebook->api("/" . $row['facebook_id']. "/feed", 'POST', $post);
它会产生像这样的小图片
此代码不产生任何内容
/* make the API call */
$response = $facebook->api(
"/me/objects/article",//or /$user_id/objects/article
"POST",
array (
'fb:app_id' => '302184056577324',//change with stuff
'og:type' => 'article',
'og:url' => 'Put your own URL to the object here',
'og:title' => 'Sample Article',
'og:image' => 'https://s-static.ak.fbcdn.net/images/devsite/attachment_blank.png',
)
);
/* handle the result */
有人可以像7年前一样提供工作代码或解释吗?
答案 0 :(得分:0)
如果您希望图像以较大的尺寸显示,则源图像必须至少为1200x630像素,如https://developers.facebook.com/docs/opengraph/howtos/maximizing-distribution-media-content#images所述并已由CBroe指出......