Java 类com.facebook.widget.WebDialog.RequestsDialogBuilder 实例源码

项目:QuizUpWinner    文件:FacebookFriendsFragment.java   
private void sendRequestDialog(String paramString, final  paramῚ)
{
  Bundle localBundle = new Bundle();
  localBundle.putString("message", ċ.ˊ(2131165775));
  localBundle.putString("to", "[" + paramString + "]");
  ((WebDialog.RequestsDialogBuilder)new WebDialog.RequestsDialogBuilder(getActivity(), Session.getActiveSession(), localBundle).setOnCompleteListener(new WebDialog.OnCompleteListener()
  {
    public void onComplete(Bundle paramAnonymousBundle, FacebookException paramAnonymousFacebookException)
    {
      if (paramAnonymousFacebookException != null)
      {
        if (!(paramAnonymousFacebookException instanceof FacebookOperationCanceledException))
          Toast.makeText(FacebookFriendsFragment.this.getActivity().getApplicationContext(), "Network Error", 0).show();
      }
      else if (paramAnonymousBundle.getString("request") != null)
      {
        paramῚ.ˎ = true;
        FacebookFriendsFragment.this.adapter.notifyDataSetChanged();
        .ˊ("Viral", new HashMap()
        {
        });
        .ˎ();
        return;
      }
      Toast.makeText(FacebookFriendsFragment.this.getActivity().getApplicationContext(), "Request cancelled", 0).show();
    }
  })).build().show();
}
项目:Wabbit-Messenger---android-client    文件:FBMgr.java   
public  void sendRequestDialog(final Activity activity, final String pToUserId) {
       activity.runOnUiThread(new Runnable(){
        @Override
        public void run() {
            Bundle params = new Bundle();
            params.putString("to", pToUserId);

            RequestsDialogBuilder dialog = new RequestsDialogBuilder(activity,
                    Session.getActiveSession(),
                    params);
            /*dialog.setLink("https://play.google.com/store/apps/details?id=com.yoero.puzzle.arukone.flow.free");
            dialog.setDescription("descriptie");
            dialog.setCaption("captie");
            dialog.setName("Bingo Free name");
            */
            dialog.setTitle("Bingo Run Free");
            //dialog.setData("Bogdan tirca");
            dialog.setMessage("Join me on Bingo Free! I'm having a great time playing it!");

            WebDialog requestsDialog = dialog.build();
            requestsDialog.setOnCompleteListener(new OnCompleteListener() {
                @Override
                public void onComplete(final Bundle values, final FacebookException error) {
                        if (error != null) {
                            if (error instanceof FacebookOperationCanceledException) {
                                Toast.makeText(activity.getApplicationContext(),
                                    "Request cancelled", 
                                    Toast.LENGTH_SHORT).show();
                            } else {
                                Toast.makeText(activity.getApplicationContext(),
                                    "Network Error", 
                                    Toast.LENGTH_SHORT).show();
                            }
                        } else {
                            final String requestId = values.getString("request");
                            if (requestId != null) {
                                Toast.makeText(activity.getApplicationContext(),
                                    "Request sent",  
                                    Toast.LENGTH_SHORT).show();
                            } else {
                                Toast.makeText(activity.getApplicationContext(),
                                    "Request cancelled", 
                                    Toast.LENGTH_SHORT).show();
                            }
                        }
                }
             });

            requestsDialog.show();
        }

    });

}
项目:wabbit-client    文件:FacebookManager.java   
public  void sendRequestDialog(final String pToUserId) {
    mMainAct.runOnUiThread(new Runnable(){

        @Override
        public void run() {
            Bundle params = new Bundle();
            params.putString("to", pToUserId);

            RequestsDialogBuilder dialog = new WebDialog.RequestsDialogBuilder(mMainAct,
                    Session.getActiveSession(),
                    params);
            /*dialog.setLink("https://play.google.com/store/apps/details?id=com.yoero.puzzle.arukone.flow.free");
            dialog.setDescription("descriptie");
            dialog.setCaption("captie");
            dialog.setName("Bingo Free name");
            */
            dialog.setTitle("Bingo Run Free");
            //dialog.setData("Bogdan tirca");
            dialog.setMessage("Join me on Bingo Free! I'm having a great time playing it!");

            WebDialog requestsDialog = dialog.build();
            requestsDialog.setOnCompleteListener(new OnCompleteListener() {
                @Override
                public void onComplete(final Bundle values, final FacebookException error) {
                        if (error != null) {
                            if (error instanceof FacebookOperationCanceledException) {
                                Toast.makeText(mMainAct.getApplicationContext(), 
                                    "Request cancelled", 
                                    Toast.LENGTH_SHORT).show();
                            } else {
                                Toast.makeText(mMainAct.getApplicationContext(), 
                                    "Network Error", 
                                    Toast.LENGTH_SHORT).show();
                            }
                        } else {
                            final String requestId = values.getString("request");
                            if (requestId != null) {
                                Toast.makeText(mMainAct.getApplicationContext(), 
                                    "Request sent",  
                                    Toast.LENGTH_SHORT).show();
                            } else {
                                Toast.makeText(mMainAct.getApplicationContext(), 
                                    "Request cancelled", 
                                    Toast.LENGTH_SHORT).show();
                            }
                        }
                }
             });

            requestsDialog.show();
        }

    });

}