0

I am trying to post to a users Activity feed on Facebook using the PHP SDK, is this possible? Or only with Javascript?

Here is my basic code to post to a users wall:

$facebook->api('/me/feed', 'POST',
     array(
         'link' => 'www.example.com',
         'message' => 'Posting with the PHP SDK!'
     ));

I want to post to a users activity, how is this done? I've experimented with the code below but to no success.

$facebook->api('/me/application:view', 'POST',
         array(
             'item' => 'www.example.com',
         ));

Can anyone shed any light on this?

Adam
  • 1,957
  • 3
  • 27
  • 56
  • https://developers.facebook.com/docs/opengraph/actions/#create – CBroe Aug 14 '12 at 14:17
  • But it doen't say anything about PHP, only JS – Adam Aug 14 '12 at 15:39
  • So what, there’s no big difference … API endpoint and method are the same, and parameters are given as an associative array when using PHP Facebook::api … you should be able to figure this out, don’t you think? – CBroe Aug 14 '12 at 15:43

1 Answers1

0

I'm not using opengraph in my apps right now, but hope this helps: https://developers.facebook.com/docs/opengraph/tutorial/#publish

Also check this answer (there is an example in PHP): https://stackoverflow.com/a/11383901/173299

Hope it helps you.

Community
  • 1
  • 1
chuysbz
  • 1,262
  • 6
  • 18
  • 47