This works on the latest version:
- Go to https://graph.facebook.com/<user_name_here> (https://graph.facebook.com/fsintents for instance)
- Copy your id
-
Use this method:
public static Intent getOpenFacebookIntent(Context context) { try { context.getPackageManager().getPackageInfo("com.facebook.katana", 0); return new Intent(Intent.ACTION_VIEW, Uri.parse("fb://page/<id_here>")); } catch (Exception e) { return new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.facebook.com/<user_name_here>")); } }
This will open the Facebook app if the user has it installed. Otherwise, it will open Facebook in the browser.
EDIT: since version 11.0.0.11.23 (3002850) Facebook App do not support this way anymore, there’s another way, check the response below from Jared Rummler.