我正在尝试从我的 Android 应用程序向 facebook 发布状态...我已经在演示项目中完成了该操作,并且在设备中安装 facebook 后,当我尝试在自己的项目中执行此操作时,它运行良好显示“无法发布到墙上”... 这是我的 logcat 的快照
有什么建议请...
最佳答案
不要在主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/