fb:// profile / {userid}似乎不工作 [英] fb://profile/{userid} seems to be not working

查看:486
本文介绍了fb:// profile / {userid}似乎不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用特定页面启动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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆