I'm working on a facebook app in flash with AS3, using the facebook graph API. At times, I'm sending apprequests to users and I need to include some data in the request, to be used if the user clicks on it and runs the app.

My request code so far is this:

var fbReq:Object = new Object();
fbReq.message='Play with me!';
fbReq.title='You were invited to play a game!';
fbReq.to=sendTo;
fbReq.data = {test: "testingData"};

Facebook.ui('apprequests',fbReq,inviteResult,'iframe');

According to what I could find online, the data object should be added as URL params when my app loads, but I can't see those anywhere.

有帮助吗?

解决方案

According to what I could find online, the data object should be added as URL params when my app loads

I don’t know what gave you that idea – but it’s just not true.

https://developers.facebook.com/docs/reference/dialogs/requests/:

data: Optional, additional data you may pass for tracking. This will be stored as part of the request objects created.

So you have to read the request object, using the request ID that is passed to your app.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top