0
如何从用户名打开Facebook个人资料?或者我应该在Android中使用哪个请求来获取(并打开)Facebook个人资料。Android:从用户名中打开Facebook应用程序中的个人资料
Intent intent;
try {
activity.getPackageManager()
.getPackageInfo("com.facebook.katana", 0); // Checks if FB is even installed.
intent = new Intent(Intent.ACTION_VIEW,
Uri.parse("fb://profile/" + famous)); // Trys to make intent with FB's URI
} catch (Exception e) {
intent = new Intent(Intent.ACTION_VIEW,
Uri.parse("https://www.facebook.com/" + famous)); // catches and opens a url to the desired page
}
activity.startActivity(intent);
试过,但没有与用户名工作(去用户 - 这是在登录的用户 - 墙)和id(静态插入,显示错误 - 无法加载此配置文件)...