1

我正在将 facebook 游戏组添加到 Android 应用程序并尝试使用 Dialog 创建一个 facebook 游戏组,如文档中所示 - https://developers.facebook.com/docs/games/app-game-groups/v2.1

Bundle params = new Bundle();
params.putString("name", "A test group");
params.putString("description", "A description for my group.");
params.putString("privacy", "open");

WebDialog feedDialog = (
        new WebDialog.Builder(getActivity(),
                Session.getActiveSession(),
                "game_group_create",
                params))
                .setOnCompleteListener(new OnCompleteListener() {
                    @Override
                    public void onComplete(Bundle values,
                                           FacebookException error) {
                        if (error != null && 
                                (error instanceof FacebookOperationCanceledException ||
                                        error instanceof FacebookServiceException)) {
                            Log.d(TAG, "User canceled by closing dialog or canceling.");
                        } else {
                            // success
                            Log.d(TAG, "group created: " + values.toString());                                          
                        }                                       
                    }
                })
                .build();
                feedDialog.show();

对话框显示为空,没有任何内容,只是带有关闭按钮“x”的白色窗口

任何想法?

4

1 回答 1

0

The access_token used to create game group must be app_access_token in the format of {app_id}|{app_secret}.


And more importantly, this request must be called from server side to avoid app token being leaked.


I also don't know how to generate App Access Token from Java client.

于 2015-06-25T08:12:50.697 回答