简体   繁体   English

从我的应用与之共享时,Android上的Facebook立即退出

[英]Facebook on Android exits immediately when sharing with it from my app

When I share some URL (as text) from my app with Facebook, the Facebook new post activity appears and exits immediately and my app re-appears. 当我与Facebook共享我的应用程序中的一些URL(作为文本)时,Facebook新帖子活动出现并立即退出,并且我的应用程序重新出现。 The user has no chance to submit it, or even review and finish it. 用户没有机会提交它,甚至没有机会查看并完成它。 This is (apparently) not a crash, there is no notification about Facebook app crashing. (显然)这不是崩溃,没有关于Facebook应用程序崩溃的通知。 When shared with some other app (eg Gmail), it works fine. 与其他应用程序(例如Gmail)共享时,它可以正常工作。

Unfortunately this only happens on some devices. 不幸的是,这仅在某些设备上发生。 All devices where I tested it have the same version of the Facebook app. 我测试过的所有设备都具有相同版本的Facebook应用。 It's not related to Android version (tested on two 4.4 devices, one of them is OK and one is not). 它与Android版本无关(已在两台4.4设备上测试过,其中一台还可以,另一台不可以)。

This is what I'm doing in my app: 这是我在应用程序中所做的:

String textToShare = "http://lovelikeorhate.eu/question/LOVE/3";
Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, textToShare);
sendIntent.putExtra("com.facebook.platform.extra.APPLICATION_ID", getString(R.string.facebook_app_id));
sendIntent.setType("text/plain");
startActivity(Intent.createChooser(sendIntent, getResources().getText(R.string.send_to)));

Any ideas what might be wrong? 任何想法可能有什么问题吗? The URL is applinks enabled, could it be related? 该网址启用了应用链接,可以关联吗?

The app needs to be in production mode on Facebook. 该应用程序必须在Facebook上处于生产模式。 This is the same problem: ClassNotFoundException on opening facebook share icon in android 这是相同的问题: 在Android中打开Facebook共享图标时出现ClassNotFoundException

暂无
暂无

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

相关问题 共享内容时从我的ANDROID应用中删除Facebook权限对话框吗? - Remove facebook permissions dialogs from my ANDROID app while sharing contents? 在Android应用程序中,使用Facebook共享对话框从我的应用程序显示的Shared帖子向我显示,而不向其他人显示。 为什么? - In Android Shared post from my app using Facebook sharing dialog is showing to me but not to others . Why? 当我按下返回按钮时,我的应用程序立即退出,不要等待用户的确认 - My application immediately exits when i i press back button, dont wait for confirmation from user 将Facebook共享集成到我的应用中 - Integrating Facebook Sharing into my app 从Android Spotify共享到我的应用 - Sharing from Android spotify to my app 通过android应用共享图像时Facebook上传失败错误 - Facebook upload fail error when sharing image through android app 在Android应用程序中共享照片时,Facebook“共享”按钮被禁用 - Facebook “Share” button is disabled when sharing photo in android app 我的应用程序中的 Facebook 共享在摩托罗拉 Droid 上崩溃? - Facebook sharing from my app crashes on Motorola Droid? 在Android中共享是否需要来自Facebook的应用验证表单? - Does sharing in android require app verificationform from Facebook? 从“照片”应用共享时,我的Android应用在列表中显示两次 - My Android App shows up twice in list when sharing from the Photos App
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM