我用户邀请朋友使用请求对话我的应用程序一起发送的“数据”的信息。我怎样才能得到这是与Facebook请求
我一起额外的数据发送如下:
FB.ui({
method: 'apprequests',
message: "Come to this great site,
data: '{"page_id": "<%[email protected]%>"}'
},...
当该请求被接受的人邀请他们被带到我的网站。
我想读书,我在“数据”发送沿着信息。
我明白我需要在请求object_ids 我有那些。
我只是不知道如何在Rails和Java脚本对象内部的信息获取。
我看到使用PHP这个例子:
$request_content = json_decode(file_get_contents("https://graph.facebook.com/$request_id?$app_token"), TRUE);
extract(json_decode($request_content['data'], TRUE));
我怎么能做到这一点使用Rails,Ruby的从我的控制器内?
我使用OmniAuth BTW