views:

36

answers:

0

here is the php code that works. $fb_activity_message = '{actor} started a game'; $fb_activity_array = json_encode(array('message' => $fb_activity_message, 'action_link' => array('text' => 'Play Now','href' => 'http://apps.facebook.com/mygame')));

in c# I use http://www.codeplex.com/Json to encode

and here is the final json that gets sent to facebook.

{"message": "{actor} started a game", "action_link": { "href": "http://apps.facebook.com/mygame", "text": "Learn To Play" }}

but facebook doesn't like it. they say {actor} is missing. It needs to conform to these specs http://wiki.developers.facebook.com/index.php/Dashboard.publishActivity