fb:// profile / {userid}似乎不工作 [英] fb://profile/{userid} seems to be not working
问题描述
我尝试使用特定页面启动Facebook应用程序,它正在使用早期版本的FB APP,但新版本为25.0.0.19.30。这个功能不起作用,uri.parse(fb:// profile / {userid})的意图让我进入内容不可用的页面。
I try to launch facebook app with specific page , it was working with earlier version of FB APP but with new version that is 25.0.0.19.30 . This functionality is not working , the intent with uri.parse("fb://profile/{userid}") takes me to content not available page .
- 是否是Facebook的安全更新。
使用特定用户页面启动应用程序的任何其他方式。
any other way to launch the app with particular user page.
推荐答案
您应该使用fb:// page / {id}
You should use fb://page/{id}
从这里学习: http://binwaheed.blogspot .com.ar / 2014/06 / android-open-facebook-official-app-from.html
如果你需要回到浏览器应该执行这样的操作:
In case you need to fall back to the browser you should implement something like this:
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);
这篇关于fb:// profile / {userid}似乎不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!