2012-08-30 107 views
-1

我正在使用Facebook的PHP SDK。我在我的應用程序中整合了facebook open圖表。 我想使用本圖像中的開放圖形在朋友牆上張貼。 我從另一個應用程序中捕獲了這個圖像牆貼,我想做這樣的相同職位。如何發佈在Facebook上的朋友牆上?

此外我想做一個動作鏈接,如「獲取應用程序」。 當用戶點擊獲取應用程序。我的應用應該在新標籤上打開。

我看過很多文檔。他們說這是不可能發佈在使用開放圖的朋友牆上,我嘗試了$ facebook-> api('/ $ firend_id/feed),但它在朋友牆上張貼了一個鏈接。 我不想要鏈接我想發佈給朋友牆的禮物。

請給我建議我該怎麼做?

問候, 克里希納post form other's app

+0

您不能將開放圖表操作發佈到其他人,而不是您的應用用戶。但是,對我來說,這看起來並不像一個Open Graph操作,而只是發佈到其他人的牆上。鏈接本身可能有參數,這樣應用程序就會知道在鏈接被點擊時誰給了誰。 – CBroe

回答

0

我解決了它使用命中和試用方法。

$attachment = array(
      'message' => $d['giftmsg'], 
      'name' => 'You have recived a gift voucher for a '.$dd['title'].'!' .'', 
      'link'=>'https://thevoucherlink.com/redirect.php', 
      'description' => " Please click on the link to claim your gift card. Do it soon! This promotional card is valid for a limited time.. <center>&nbsp;</center> The Voucher Link allows facebook users send gift vouchers from local businesses to their friends", 
      'picture' => $im, 
      'actions'=>array('name'=>'Get Voucher','link'=>'https://thevoucherlink.com/redirect.php') 
     ); 


     try { 
      $t= $facebook->api('/' . $_POST['friend_id']. '/feed', 'POST', $attachment); 
     } catch (Exception $exc) { 
      $err= $exc->getTraceAsString(); 
     } 

您可以在帖子上使用這些參數進行相同的文章。

謝謝您的回答。

相關問題