2012-08-27 114 views
0

你好,我只是想打电话跟下面的链接Facebook的应用程序(在我的Android项目):Facebook的链接不工作的android

String url_facebook_prixo = "https://www.facebook.com/pages/Prixo/468580313168290"; 

我尝试这样做:

Uri uri = Uri.parse("facebook://facebook.com/page{468580313168290}"); 
          Intent viewIntent = new Intent(Intent.ACTION_VIEW, uri); 
startActivity(viewIntent); 

我与其他人试图链接但它只显示我的墙..

有人?

回答

1

你应该使用id来打开页面。

Intent facebookIntent = new Intent(
      Intent.ACTION_VIEW, 
      Uri.parse("fb://profile/468580313168290")); 
startActivity(facebookIntent); 

我会建议你把它封装在try catch中。在捕获打开一个正常的浏览器意图

+0

是的,这样做;)谢谢你的工作好! – eento