1

这个问题是关于android的......我已经有一周的时间试图将我自己的消息显示为邀请/请求对话框和通知的标题(对于facebook SDK 3.0+),但我不知道如何,并且facebook SDK 文档是一段!@#$,我必须从头开始阅读所有文档才能了解一点信息

这是我的代码

        final Bundle parameters = new Bundle();
        parameters.putString("app_id", /*app id*/);
        parameters.putString("to", /*selected friends*/);
        parameters.putString("message", /*a message displayed to the inviter*/);
        WebDialog dialog = new WebDialog.RequestsDialogBuilder(
                        this, Session.getActiveSession(), parameters)
                        .setOnCompleteListener(new OnCompleteListener() {/*what ever happens here */}
                        }).build();
        dialog.show();

现在2分:

1- i want to set the title of the request dialog, all i can see is "app requests"
2- i want to change the message that appears in the notification for the receiver

并且请不要告诉我看 facebook 文档,它是一块!@#$

4

1 回答 1

0

不确定您是否可以实际更改通知的消息。如果您可以在文档中找到它,它会告诉您这是不可能的(至少这是我上次遇到的)。但是您可以更改对话框的标题。

WebDialog dialog = new WebDialog.RequestsDialogBuilder(
                    this, Session.getActiveSession(), parameters)
                    .setTitle("Whatever title you like")
                    .setOnCompleteListener(new OnCompleteListener() {
                        /*what ever happens here */
                    }}).build();
dialog.show();
于 2014-08-01T08:10:42.287 回答