1

我想向不在我的 facebook 应用程序上的 facebook 用户发送邀请。我实现了下面的代码,得到了对话框,点击发送按钮后,我也收到了一条成功消息,但在 facebook 上没有收到任何通知。我想我必须添加一些 uri Redirect,但我不知道在哪里添加。请帮忙

Bundle params = new Bundle();
    params.putString("message", "come and play with me if u dare ! ");


    WebDialog requestsDialog = (
            new WebDialog.RequestsDialogBuilder(SendInviteToFB.this,
                Session.getActiveSession(),
                params))
                    .setOnCompleteListener(new WebDialog.OnCompleteListener(){
                    public void onComplete(Bundle values,
                        FacebookException error) {
                        if (error != null) {
                            if (error instanceof FacebookOperationCanceledException) {
                                Toast.makeText(SendInviteToFB.this, 
                                    "Request cancelled", 
                                    Toast.LENGTH_SHORT).show();
                            } else {
                                Toast.makeText(SendInviteToFB.this, 
                                    "Network Error", 
                                    Toast.LENGTH_SHORT).show();
                            }
                        } else {
                            final String requestId = values.getString("request");
                            if (requestId != null) {
                                Toast.makeText(SendInviteToFB.this, 
                                    "Request sent",  
                                    Toast.LENGTH_SHORT).show();
                            } else {
                                Toast.makeText(SendInviteToFB.this, 
                                    "Request cancelled", 
                                    Toast.LENGTH_SHORT).show();
                            }
                        }   
                    }

                })
                .build();
        requestsDialog.show(); 
4

0 回答 0