我有以下的Facebook代碼鏈接在本地Facebook應用程序中打開。它工作正常,但僅適用於此處給出的配置文件ID url = "fb://profile/100012746891816";
。 如果有人可以幫助和編輯我的代碼,並使其在Facebook上的幾個配置文件或網頁上工作,並自動生成Facebook的身份證。如何使網站上的幾個Facebook鏈接在Facebook本機應用程序中打開並自動生成Facebook配置文件或頁面數字ID
這裏是如何通過連接php <a href="<?php echo "http://facebook.com/".$fbk; ?>">
$fbk
包含Facebook頁面或配置文件名稱。
if (url.contains("http://facebook.com")) {
Uri uri = Uri.parse(url);
try {
url = "fb://profile/100012746891816";
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
startActivity(intent);
} catch(Exception e) {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
}
return true;
}
在這方面的幫助? –