Open Facebook user profile

521 Views Asked by At

Is there a way to open a Facebook user profile with the Facebook app from another app?

I get this link from Graph Api: https://www.facebook.com/app_scoped_user_id/1234567/ that is the link to the user profile and I will like to open the profile using the Facebook app.

If I create an intent with ACTION_VIEW and that URL it opens Facebook in the browser.

Thanks!

I saw other options but they are outdated. I'm using v2.4 from Graph API.

1

There are 1 best solutions below

0
roy_lennon On

I used this code and finally it worked. Based on the post suggested by @Kristo1990.

String uri = "fb://profile/12345678";
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));
startActivity(intent);