I try to launch facebook app with specific page , it was working with earlier version of FB APP but with new version that is 25.0.0.19.30 . This functionality is not working , the intent with uri.parse("fb://profile/{userid}") takes me to content not available page .
any other way to launch the app with particular user page.
A username is the web address for your profile or Page (example: Facebook.com/yourname). Your username is often a variation of your name, like jane. doe33 or janedoe3. You can create your own username or choose a username that Facebook suggests.
Your Facebook ID is a Numbers string that is connected to your Facebook profile. Facebook automatically assigns a User ID to every profile. Anyone with your User ID can see your profile and Public information. There are many apps on Facebook that require your Numeric User ID to connect to your Facebook profile.
Go to the person's profile. You can find it by typing their name into the search box at the top of the screen or by clicking their name in your Friends list.
You should use fb://page/{id}
Learned it from here: http://binwaheed.blogspot.com.ar/2014/06/android-open-facebook-official-app-from.html
In case you need to fall back to the browser you should implement something like this:
Intent intent = null;
try {
// get the Facebook app if possible
this.getPackageManager().getPackageInfo("com.facebook.katana", 0);
intent = new Intent(Intent.ACTION_VIEW, Uri.parse("fb://page/{id}"));
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
} catch (Exception e) {
// no Facebook app, revert to browser
intent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://facebook.com/PROFILENAME"));
}
this.startActivity(intent);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With