我想发布给所有的人通过应用程序连接 发布他所有的朋友在墙上,这个代码只发布它的墙 需要更改或添加到它的内容将带到他的朋友列表中,并通过应用程序将他们发布在墙上
请帮我
require "../settings.php";
require '../src/facebook.php';
require "../fbaccess.php";
require "web_config.php";
//user data from database
$sql = mysql_query("SELECT user_id,user_access_token,user_access_token_expire FROM data_table");
while ($data = mysql_fetch_array($sql)){
$user_id = $data['user_id'];
$accessToken = $data['user_access_token'];
$accessTokenExpire = $data['user_access_token_expire'];
try {
$publishStream = $facebook->api("/$user_id/feed", 'post', array(
'message' => "",
'link' => '',
'picture' => '',
'name' => 'iOS Apps & Games',
'description'=> ''
)
);
//as $_GET['publish'] is set so remove it by redirecting user to the base url
} catch (FacebookApiException $e) {
error_log($e);
}
}