0
我拼命尋找圖像附件php api飼料爲我的Facebook應用程序。尋找圖像附件php API的feed.publish
基本上我試圖做的是發送一個圖像附件,以及一個自動的「張貼到朋友牆」行動。
它背後的想法是,用戶發送一個「虛擬漢堡」給他們的朋友牆,並給他們提供折扣的消息。
這是成功發送消息的代碼片段,但無法使附件正常工作。
if($_REQUEST['friend_1']!='' && $_REQUEST['friend_1']!="Start typing a friend's name") {
try {
$fql1 = "select name from user where uid=" . $_REQUEST['friend_1'];
$param1 = array(
'method' => 'fql.query',
'query' => $fql1,
'callback' => ''
);
$fqlResult1 = $facebook->api($param1);
$friend_1_name = $fqlResult1[0]['name'];
$statusUpdate = $facebook->api('/'.$_REQUEST['friend_1'].'/feed', 'post', array('link' => $fanpageURL, 'name' => 'Have a virtual Unity Burger.', 'description' => " ".$user_name." just sent you a virtual Unity Burger. If you would rather have the real thing then come add your name on the Unity list and we will give you a 20% discount on your next visit and an exclusive Unity keyring.", 'properties' => '', 'cb' => ''));
} catch (FacebookApiException $e) {
//echo "Notification not send to user ".$fqlResult1[0]['name']."<br>";