![](/img/trans.png)
[英]Android open facebook page link in facebook app if installed ,
[英]Open Facebook page via Facebook app
如何使用已安装的Facebook应用程序打开Facebook页面? 完全是页面,而不是配置文件,因为fb:// profile工作正常。
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("fb://page/page_id")));
好像fb://页面不起作用,因为它只是打开Feed。
fb:// page / {id}是要走的路:
final String url = "fb://page/" + facebookID
Intent facebookAppIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
facebookAppIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
startActivity(facebookAppIntent);
您确定使用的是Facebook页面的ID号而不是用户名吗?
我的意思是,例如,如果你想打开Facebook本身的Facebook页面(即https://www.facebook.com/facebook ),你必须使用:
fb://page/20531316728
由于20531316728是Facebook页面的ID (而facebook是用户名 )。
如果您不知道Facebook页面的ID,可以检查它的开头:
https://graph.facebook.com/{username}
确保您正确使用页面的页面ID
Intent intent = new Intent(Intent.ACTION_VIEW, Uri
.parse("fb://page/YOUR PAGE ID"));
startActivity(intent);
我想你应该用
https://www.facebook.com/而不是fb:// page /或fb://个人资料或其他内容。 我希望它有用!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.