如何使用cURL在Facebook应用程序用户的Facebook Feed上发布?

时间:2011-06-11 08:13:10

标签: php facebook curl

我使用javascript和HTML5 Canvas元素制作了蛇游戏。它可以在apps.facebook.com/snaqe_game找到。我已经获得了权限,并使用Facebook开发人员文档授权了app_bued或者某些东西,但我面临的问题是在他的墙上发布了玩家的分数。 请注意:

  • 我没有PHP SDK

请参阅:apps.facebook.com/mg-copter

1 个答案:

答案 0 :(得分:1)

Update Facebook News Feed using the Graph API in PHP

$data = array();
$data['post'] = array(
   'access_token' => $access_token,
   'message' => 'this is the message',
   'picture' => 'http://sudocode.net/wp-content/uploads/2011/01/developer.facebook.com_banner-150x150.png',
   'link' => 'http://sudocode.net/article/313/how-to-register-a-new-facebook-application/',
   'name' => 'How to Register a New Facebook Application',
   'caption' => 'sudocode | it looks like it works',
   'description' => 'Here are some notes on how to register a new Facebook application.',
   'actions' => '{"name": "Read the Article", "link": "http://sudocode.net/article/313/how-to-register-a-new-facebook-application/"}',
   );
$response = xhttp::fetch("https://graph.facebook.com/{$profile_id}/feed", $data);