我正在尝试将 Facebook 集成到我的 Android 应用程序以进行社交发布。我已经从这里下载了最新的 Facebook sdk并应用了发布到 Facebook 所需的所有设置。现在我可以发布到 Facebook。但问题是,当我从 facebook sdk 运行示例程序时,一个类似页面的浏览器是打开的,用户必须自己在那里输入消息。但我不希望这个页面出现。我希望在不打开 Facebook 对话框的情况下直接发布固定消息。但是如果没有办法避免这种情况,请告诉我如何修复消息的某些部分,以便用户无法修改它。提前致谢
EDIT1:这是我使用这个项目后得到的消息
04-10 11:44:34.691: I/dalvikvm(719): Failed resolving Lnet/xeomax/TestRocket/TestRocket;
>interface 22 'Lnet/xeomax/FBRocket/LoginListener;'
>04-10 11:44:34.691: W/dalvikvm(719): Link of class 'Lnet/xeomax/TestRocket/TestRocket;' failed
>04-10 11:44:34.691: D/AndroidRuntime(719): Shutting down VM
>04-10 11:44:34.701: W/dalvikvm(719): threadid=1: thread exiting with uncaught exception (group=0x40015560)
>04-10 11:44:34.781: E/AndroidRuntime(719): FATAL EXCEPTION: main
>04-10 11:44:34.781: E/AndroidRuntime(719): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{net.xeomax.TestRocket/net.xeomax.TestRocket.TestRocket}: java.lang.ClassNotFoundException: net.xeomax.TestRocket.TestRocket in loader dalvik.system.PathClassLoader[/data/app/net.xeomax.TestRocket-1.apk]
>04-10 11:44:34.781: E/AndroidRuntime(719): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1569)
>04-10 11:44:34.781: E/AndroidRuntime(719): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
>04-10 11:44:34.781: E/AndroidRuntime(719): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
>04-10 11:44:34.781: E/AndroidRuntime(719): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
>04-10 11:44:34.781: E/AndroidRuntime(719): at android.os.Handler.dispatchMessage(Handler.java:99)
>04-10 11:44:34.781: E/AndroidRuntime(719): at android.os.Looper.loop(Looper.java:130)
>04-10 11:44:34.781: E/AndroidRuntime(719): at android.app.ActivityThread.main(ActivityThread.java:3683)
>04-10 11:44:34.781: E/AndroidRuntime(719): at java.lang.reflect.Method.invokeNative(Native Method)
>04-10 11:44:34.781: E/AndroidRuntime(719): at java.lang.reflect.Method.invoke(Method.java:507)
>04-10 11:44:34.781: E/AndroidRuntime(719): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
>04-10 11:44:34.781: E/AndroidRuntime(719): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
>04-10 11:44:34.781: E/AndroidRuntime(719): at dalvik.system.NativeStart.main(Native Method)
>04-10 11:44:34.781: E/AndroidRuntime(719): Caused by: java.lang.ClassNotFoundException: net.xeomax.TestRocket.TestRocket in loader dalvik.system.PathClassLoader[/data/app/net.xeomax.TestRocket-1.apk]
>04-10 11:44:34.781: E/AndroidRuntime(719): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
>04-10 11:44:34.781: E/AndroidRuntime(719): at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
>04-10 11:44:34.781: E/AndroidRuntime(719): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
>04-10 11:44:34.781: E/AndroidRuntime(719): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
>04-10 11:44:34.781: E/AndroidRuntime(719): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561)
>04-10 11:44:34.781: E/AndroidRuntime(719): ... 11 more
编辑 2:通过引入微小的变化,现在我可以摆脱上述错误。只需将文件夹“libs”添加到项目中并在此文件夹中添加“fbrocket-0.1a.jar”。非常感谢大家花时间帮助我。