改变Facebook的SDK请求对话框的标题和放大器;通知冠军放大器、对话框、冠军、标题

2023-09-07 22:19:22 作者:听、这一季雨落

这个问题是关于Android的......我已经一个星期了,现在想显示自己的消息的邀请/请求对话框标题和通知,以及(对于Facebook SDK 3.0+),但我不能知道怎么了,Facebook的SDK文档是一块!@#$的,我必须经过所有文件从一开始就知道一点资料片

this question is about android ... I have been a week for now trying to display my own message as a title for the invitation/request dialog and for the notification as well (for facebook SDK 3.0+) but i cant know how, and the facebook SDK documentation is a piece of !@#$, i must go through all the documentation from the start to know a little piece of information

这是我的code

        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的文档,它是一块!@#$

and PLEASE dont tell me see the facebook documentation, it is a piece of !@#$

推荐答案

不知道你是否能真正改变的消息通知。如果你能找到它的文档中,它会告诉你,这是不可能的(至少这是我最后一次碰到)。但是你可以改变对话框的标题。

Not sure if you can actually change the message for the notification. If you can find it in the documentation, it will tell you it's not possible (at least that's what I last came across). But you can change the title for the Dialog.

WebDialog dialog = new WebDialog.RequestsDialogBuilder(
                    this, Session.getActiveSession(), parameters)
                    .setTitle("Whatever title you like")
                    .setOnCompleteListener(new OnCompleteListener() {
                        /*what ever happens here */
                    }}).build();
dialog.show();