[英]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.