我正在将 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”的白色窗口
任何想法?