【发布时间】:2025-12-01 08:25:01
【问题描述】:
有没有办法将图像发送到 facebook 用户的墙上?要发布文本,我使用以下代码:
$arpost = array(
'message' => $text,
'access_token' => $token
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($arpost));
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
$result = curl_exec($ch);
curl_close($ch);
为后代:http://developers.facebook.com/docs/reference/api/post/
$args = array(
'message' => $text,
'picture' => $link2picture
);
$this->_facebook->api('/me/feed/', 'post', $args);
【问题讨论】:
-
在该链接下,没有任何建议可以解决我的问题...主题中的链接指向旧解决方案。我使用图形 api。