Sha*_*der 7 android facebook android-intent android-facebook
我尝试使用特定页面启动Facebook应用程序,它正在使用早期版本的FB APP,但新版本是25.0.0.19.30.此功能无效,uri.parse("fb:// profile/{userid}")的意图将我带到内容不可用的页面.
用特定用户页面启动应用程序的任何其他方式.
hum*_*lex 11
你应该使用fb:// page/{id}
从这里了解到:http://binwaheed.blogspot.com.ar/2014/06/android-open-facebook-official-app-from.html
如果你需要回到浏览器,你应该实现这样的事情:
Intent intent = null;
try {
    // get the Facebook app if possible
    this.getPackageManager().getPackageInfo("com.facebook.katana", 0);
    intent = new Intent(Intent.ACTION_VIEW, Uri.parse("fb://page/{id}"));
    intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
} catch (Exception e) {
    // no Facebook app, revert to browser
    intent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://facebook.com/PROFILENAME"));
}
this.startActivity(intent);