2012-03-05 10 views
0
private function InviteMyFriends(e:MouseEvent):void{ 


      var dat:Object = new Object(); 
      dat.message = "Let's invite friends for our Super Krish QuizGame Facebook App to get bonus points"; 
      dat.title = 'Super Krish QuizGame 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(dat):void{ 

      var result:Object = dat; 
      if(result == null){ 

       mtline.trace2_txt.text = "User closed the pop up window without inviting any friends"; 
       return 
      } 
      var invitedUsers:Array = new Array(); 
      invitedUsers = result.request_ids as Array; 
      mtline.trace2_txt.text ="You Have Invited " + invitedUsers.length+ " friends"; 
      //Simple if else if you want user to invite certain amount of friends 
      if(invitedUsers.length > 1){ 
       mtline.trace2_txt.text = "GREAT, USER IS GENERATING TRAFFIC"; 
      }else{ 
       mtline.trace2_txt.text = "No Good, User invited only one friend "; 
      } 
     } 

を受け入れFacebookの友達からの通知を取得こんにちは、ここで私は完全に作業アクションscripting.itsとFacebookのAPIを使用して、私の友人に私のFacebookのゲームの招待状を送信するには、このコードを使用しているが、私は私の友人を特定する必要があります招待状が受け入れられた後に友人に招待状を送信するユーザーに500ポイントを提供する必要があるため、招待状を受け入れた人がいます。あなたが提案しているワークフロー事前は私の招待要求

答えて

1

おかげで、Facebookのポリシーに反する明示的であり、あなたのアプリでは、それ以上進む前に、ちょうどそれを認識して、その結果として、要求を送信する機能を失う可能性があります。

受け入れられたリクエストを追跡する方法については、ユーザが「受け入れ」をクリックしたときにリクエストを読み込んで削除する必要があるため、リクエストIDを送信時にログに記録し、承認されたリクエストを処理する

関連する問題