Facebook Android-SDK 发布消息问题
我正在尝试使用 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
消息字段已于 2011 年 7 月被弃用,因为 Facebook 希望用户发布独特的内容。请参阅此博文:
The message field was deprecated in July 2011 because Facebook wants users to post unique content. See this blog post:
正如 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.