user2158360
user2158360

Reputation: 39

facebook PHP SDK posting as activity, not post

I hope you will be able to help me.

I'm developing an app, and I'm willing to post an activity (that appears on user timeline in recent activity) everytime the user use my application.

Although, for the moment, I have this code below, and it only posts a normal link :

if($can_post){ 
$facebook->api('/'.$uid.'/feed', 'post', array(  
'message' => '',  
'name' => 'Name',  
'caption' => 'Caption',
'description' => 'SDesc',
'picture' => 'picture url',
'link' => 'link',
'actions' => array(array('name' => 'catch phrase', 
 'link' => 'http://link'))
));   

Upvotes: 0

Views: 340

Answers (1)

msturdy
msturdy

Reputation: 10794

Check out this guide on posting "stories" to the user's timeline using the Open Graph API, so maybe it's this functionality that you need. The example they give is just a like, but it can be easily modified.

Be aware that Facebook will have to approve you app again if you want to use stories (see end of page on link above).

It's also worth noting that Facebook have also defined a wide range of predefined "Actions" to help in the process, so it's a good idea to check to see if your app falls into one of these categories.

Upvotes: 1

Related Questions