java - 无法发布到 Facebook 墙,显示 "Can not post to wall"

标签 java android facebook

我正在尝试从我的 Android 应用程序向 facebook 发布状态...我已经在演示项目中完成了该操作,并且在设备中安装 facebook 后,当我尝试在自己的项目中执行此操作时,它运行良好显示“无法发布到墙上”... 这是我的 logcat 的快照

enter image description here

有什么建议请...

最佳答案

不要在主UI上进行网络操作。您可以启动异步任务并在其中发布消息。 http://developer.android.com/reference/android/os/NetworkOnMainThreadException.html

The exception that is thrown when an application attempts to perform a networking operation on its main thread.

This is only thrown for applications targeting the Honeycomb SDK or higher. Applications targeting earlier SDK versions are allowed to do networking on their main event loop threads, but it's heavily discouraged. See the document Designing for Responsiveness.

关于java - 无法发布到 Facebook 墙,显示 "Can not post to wall",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12128230/

相关文章:

java - 为什么我得到 "The left-hand side of an assignment must be a variable"?

android - 在模拟器或实际设备上测试?

javascript - 我无法从本地文件运行 facebook js api?

android - 如何更改 facebook android sdk 登录按钮的样式?

java - 查询从庞大的数据表中批量获取数据

java - java中类对象的引用

java - 在 setter/getter 中创建 if

android - Android上如何使用multipart/form-data上传图片/图片

android - 在 Android 中从 OpenGL 捕获渲染图像并将其保存为 JPEG

ios - 如何从 IOS 应用程序打开特定的 Facebook 帖子。不是 Facebook 页面。打开 Facebook 帖子的正确 url 方案?