我正在使用Facebook动作脚本3 SDK为Adobe AIR +编写Android应用程序。 我可以在Android手机上向用户显示标准的apprequest对话框吗?
FB.ui({method: 'apprequests', message: 'You should learn more about this awesome game.', data: 'tracking information for the user'});
如何从Facebook动作脚本3 SDK中调用它?感谢名单!
答案 0 :(得分:1)
看一下这个回答你问题的脚本
如何从Facebook动作脚本3 SDK中调用它?
private function inviteFriends():void
{
var dat:Object = new Object();
dat.message = "Let's invite friends for our Super Extra Max Facebook App, more info go to http://blog.ukasz.com";
dat.title = 'Super Extra Max Facebook App';
// filtering for non app users only
dat.filters = ['app_non_users'];
//You can use these two options for diasplaying friends invitation window 'iframe' 'popup'
Facebook.ui('apprequests', dat, onUICallback, 'popup');
}
这是处理程序
private function onUICallback(result:Object):void{
if(result == null){
trace('User closed the pop up window without inviting any friends');
return
}
var invitedUsers:Array = new Array();
invitedUsers = result.request_ids as Array;
trace('You Have Invited ', invitedUsers.length,' friends');
//Simple if else if you want user to invite certain amount of friends
if(invitedUsers.length > 1){
trace('GREAT, USER IS GENERATING TRAFFIC');
}else{
trace('No Good, User invited only one friend.');
}
}