2011-05-10 58 views

回答

0

我假設你的意思是「在事件牆上發帖子」,因爲你不能在Facebook上評論事件。您可以使用PHP SDK(see on github)在圖形API上進行任何調用,包括在事件牆上發佈。

您需要爲您的應用程序的訪問令牌(see how to get it in the Facebook reference)和事件的ID(EVENT_ID)。然後:

require "facebook.php"; 
$facebook = new Facebook(
    'appId' => YOUR_APP_ID, 
    'secret' => YOUR_APP_SECRET, 
); 

$facebook->setAccessToken(YOUR_APP_TOKEN); 

$args['message'] = "Hello world !"; 
$facebook->api('/EVENT_ID/feed', $args); 

More on publishing post in the Facebook graph API Documentation

希望有幫助!

相關問題