简体   繁体   English

Facebook Android-SDK发布消息问题

[英]Facebook Android-SDK Posting Message Issue

I am trying to post a message to the users wall using the official facebook SDK for Android. 我正在尝试使用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() {...

Everything gets successfully addressed in the Dialog, except for the message. 除消息外,所有内容均在对话框中成功解决。 In the dialog, the message field is empty. 在对话框中,消息字段为空。

Please help, Thanks! 请帮忙,谢谢!

The message field was deprecated in July 2011 because Facebook wants users to post unique content. 该消息字段于2011年7月弃用,因为Facebook希望用户发布独特的内容。 See this blog post : 请参阅此博客文章

Breaking Change: "message" parameter ignored in Feed Dialog 重大更改:“提要”对话框中忽略了“消息”参数

On July 12, we are ignoring the message parameter in Feed Dialogs. 在7月12日,我们将忽略Feed对话框中的message参数。 This eliminates the ability to pre-fill stream stories (prohibited by Policy IV.2). 这样就消除了预先填充流新闻的能力(被政策IV.2禁止)。 This change encourages users to share authentic and relevant content with their friends. 此更改鼓励用户与朋友共享真实且相关的内容。

As BK said, the message field is now deprecated. 正如BK所说,消息字段现在已弃用。 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). 我发现您仍然可以执行此操作的唯一方法是,请求publish_stream权限并直接在其墙上发布帖子,而无需让他们看到消息或单击“共享”(从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. 附加说明:您可以创建一个自定义对话框,以允许用户在发布前查看或编辑消息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM