Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

fb://profile/{userid} seems to be not working

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 .

  • Is it an security update from facebook.

any other way to launch the app with particular user page.

like image 479
Shaik Khader Avatar asked Jan 28 '15 03:01

Shaik Khader


People also ask

What is Facebook ID example?

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.

What is Facebook ID number?

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.

How do I find someone's Facebook username?

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.


1 Answers

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);
like image 141
humbleAlex Avatar answered Sep 22 '22 17:09

humbleAlex