创建脸书应用
使用 cURL 从应用程序发布消息,但它似乎是我发布的?我怎样才能从应用程序发布,这是我的 cURL
$attachment = array(
'access_token' => $token,
'message' => '$message',
'name' => '$name',
'link' => '$link',
'description' => '$description',
'picture'=> '$picture',
'actions' => json_encode(array('name' => '$name2','link' => '$link2'))
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,'https://graph.facebook.com/'.$pId.'/feed');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $attachment);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); //to suppress the curl output
$result = curl_exec($ch);
curl_close ($ch);
该帖子有效,但看起来好像我发布了它而不是应用程序,建议?!