I want to publish stories about my users’ activities in my app so that their friends see them and become engaged.
$template_bundle_id = 12345678901; $template_data = array( 'nap-type'=>'Super Disco Nap', 'status'=>'fabulous', ); $target_ids = '12345,67890'; $result = $facebook->api_client->feed_publishUserAction ($template_bundle_id, json_encode($template_data), $target_ids);
You can optionally include a fourth parameter,
body_general, to add additional body content to extend short story
format posts. If these stories are being aggregated, Facebook will
include one of the
parameters in the aggregated story. See Three Story Sizes: Working with Template Bundles for more
information about template bundles.
Your app used to be limited to calling this function once every 12 hours for every user other than those listed as developers for your app (who will always see every story that you publish for testing purposes). At the time this book was going to press, it remained unclear as to whether that would continue to be the case with the Profile redesign.
Note that the
needs to be JSON-encoded when you pass it into the