Rohan Verma
Rohan Verma

Reputation: 445

How to post on a facebook application user's facebook feed using cURL?

I have made a snake game using javascript and HTML5 Canvas element. It can be found at apps.facebook.com/snaqe_game. I have attained permissions and authorized the app for publish_feed or something using the Facebook Developer Documentation but the problem I am facing is while posting the player's score on his wall. Please Note:


Please See: apps.facebook.com/mg-copter

Upvotes: 0

Views: 585

Answers (1)

Michael Robinson
Michael Robinson

Reputation: 29498

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);

Upvotes: 1

Related Questions