java - 更改 Facebook SDK 请求对话框标题和通知标题

标签 java android facebook facebook-requests

这个问题是关于android的...我已经花了一周时间尝试显示我自己的消息作为邀请/请求对话框和通知的标题(对于facebook SDK 3.0+),但我不知道怎么样,facebook SDK文档就是一 block !@#$,我必须从头开始看一遍所有文档才能了解一点信息

这是我的代码

        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 文档,它只是一部分!@#$

最佳答案

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

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

关于java - 更改 Facebook SDK 请求对话框标题和通知标题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23437559/

相关文章:

java - PNG图像从java服务器到android

android - 抽屉导航在 Activity 开始时打开

html - 在 Cloudfront 的页面上托管 Facebook iframe

iphone - 如何在您的 App 中截取屏幕截图并发布到 facebook 上?

javascript - 检查用户是否使用 FB.ui 在共享对话框中发布(或取消)共享到 Facebook

java - 转换为字节数组并返回后文件不可读

java - 打包 Servlet(编译时出现符号错误)

java - 使用 Eclipse 的 Apache Tomcat 启动错误

java - 我正在尝试制作一个按钮来计算文本字段中的字符数

android - 带有可滑动查看的Android选项卡布局显示在底部