啓動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