启动Facebook应用程序后,它仅显示空白页面。页面需要刷新才能显示配置文件。这是我的代码。当Facebook应用程序通过我的应用程序的Intent启动时的空白页面
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("fb://facewebmodal/f?href=https://facebook.com/Username")));
启动Facebook应用程序后,它仅显示空白页面。页面需要刷新才能显示配置文件。这是我的代码。当Facebook应用程序通过我的应用程序的Intent启动时的空白页面
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("fb://facewebmodal/f?href=https://facebook.com/Username")));
请以下URI
try{
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("fb://profile/fb_id_of_the_profile"));
startActivity(intent);
}catch(Exception e){
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.facebook.com/username)));
}
尝试用配置文件ID
我解决了问题,请更换 “fb_id_of_the_profile”。我取代了代码
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("fb://facewebmodal/f?href=https://facebook.com/Username")));
与
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("fb://facewebmodal/f?href=https://www.facebook.com/Username")));
或许这是与过去的上周五16年7月15日的最新更新。 – theFool