Facebook Android-SDK 发布消息问题

发布于 2025-01-02 04:03:33 字数 563 浏览 4 评论 0原文

我正在尝试使用 Android 版 facebook SDK 向用户墙发布消息。

            parameters.putString("method", "feed");
            parameters.putString("link", "www.example.com");
            parameters.putString("name", "Example Web");
            parameters.putString("description", "An example website for testing.
            parameters.putString("message", etMessage.getText().toString());
            facebook.dialog(this, "feed", parameters,
                    new DialogListener() {...

除了消息之外,对话框中的所有内容均已成功解决。在对话框中,消息字段为空。

请帮忙, 谢谢!

I am trying to post a message to the users wall using the official facebook SDK for Android.

            parameters.putString("method", "feed");
            parameters.putString("link", "www.example.com");
            parameters.putString("name", "Example Web");
            parameters.putString("description", "An example website for testing.
            parameters.putString("message", etMessage.getText().toString());
            facebook.dialog(this, "feed", parameters,
                    new DialogListener() {...

Everything gets successfully addressed in the Dialog, except for the message. In the dialog, the message field is empty.

Please help,
Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

财迷小姐 2025-01-09 04:03:33

消息字段已于 2011 年 7 月被弃用,因为 Facebook 希望用户发布独特的内容。请参阅此博文

重大更改:在 Feed 对话框中忽略“message”参数

7 月 12 日,我们忽略了 Feed 对话框中的消息参数。
这消除了预填充流故事的能力(被禁止)
政策 IV.2)。此更改鼓励用户分享真实且可靠的内容
与他们的朋友相关的内容。

The message field was deprecated in July 2011 because Facebook wants users to post unique content. See this blog post:

Breaking Change: "message" parameter ignored in Feed Dialog

On July 12, we are ignoring the message parameter in Feed Dialogs.
This eliminates the ability to pre-fill stream stories (prohibited by
Policy IV.2). This change encourages users to share authentic and
relevant content with their friends.

流星番茄 2025-01-09 04:03:33

正如 BK 所说,消息字段现已弃用。我发现您仍然可以这样做的唯一方法是请求publish_stream权限并直接在他们的墙上发帖,而不让他们看到消息或单击“共享”(从Facebook UI)。在某些情况下,这可能是您想要的。这是给我的。 本教程有助于展示如何做到这一点。

附加说明:您可以创建自定义对话框,让用户在发布之前查看或编辑消息。

As BK said, the message field is now deprecated. The only way I've found that you can still do this it to request the publish_stream permission and make a post directly to their wall, without letting them see the message or click "Share" (from the Facebook UI). In some cases this could be what you want though. It was for me. This tutorial was helpful in showing how to do that.

Additional note: You can create a custom dialog to let the user view or edit the message prior to posting.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文