Time for action – literally
- Open
HTTPRequestor.as
and find thepublish()
function. Create a nativeAS3
object within the function like so:var actionObj:Object = [ { name:"Visit my Twitter Page", link:"http://twitter.com/MichaelJW" } ];
Square brackets define an array, so we could type this as an
Array
rather than anObject
, but it doesn't really matter. - Next, in the same function, use the JSON library that we've used before to decode this object into a JSON string:
var actionString:String = JSON.encode(actionObj);
- Now, add this
String
as a property of theURLVariables
object, calledactions
:variables.message = a_publishObject.message; variables.picture = a_publishObject.pictureURL; variables.link = a_publishObject.linkURL; variables.name ...
Get Facebook Graph API Development with Flash now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.