Php 使用Graph API在facebook墙上共享链接的另一种方法

Php 使用Graph API在facebook墙上共享链接的另一种方法,php,facebook-graph-api,Php,Facebook Graph Api,是他们在Facebook上共享链接的任何替代php代码。我正在使用此代码在facebook墙上共享一个链接 $ret_obj = $this->facebook->api('/me/feed', 'POST', array( 'link' => 'www./excample.com', 'message' => 'Post

是他们在Facebook上共享链接的任何替代php代码。我正在使用此代码在facebook墙上共享一个链接

$ret_obj = $this->facebook->api('/me/feed', 'POST', array(
                                      'link' => 'www./excample.com',
                                      'message' => 'Posting with the PHP SDK!'
                               ));
echo '<pre>Post ID: ' . $ret_obj['id'] . '</pre>';
$ret_obj=$this->facebook->api('/me/feed',POST',array(
“link”=>“www/example.com”,
'消息'=>'使用PHP SDK发布!'
));
回显“Post ID:”$ret_obj['id'].';

您可以使用/links端点:

使用带有“link”参数的post请求


干杯

为什么这个方法不适合你的需要?如果我使用这个代码,内容会写在我的墙上。但是它不会显示在我的好友订阅源上
Instead of `feed` use `links`


$ret_obj = $this->facebook->api('/me/links', 'POST', array(
                                          'link' => 'www./excample.com',
                                          'message' => 'Posting with the PHP SDK!'
                                   ));