Launch Facebook page in Facebook app on Android

If you need to open a Facebook page  from your Android application you can do that in 2 ways:download

  • open it in the Browser
  • open it in the Facebook app installed on the phone

  1. To open the page in the Facebook app:

    String facebookPageUrl = "fb://page/218641444910278";
    Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(facebookPageUrl));
    startActivity(intent);
     
  2. To open the page in the Browser:

    String facebookPageUrl = "https://www.facebook.com/two.lion.cubs";
    Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(facebookPageUrl));
    startActivity(intent);

Other commands that you can use:

fb://root
fb://feed
fb://feed/{userID}
fb://profile
fb://profile/{userID}
fb://page/{id}
fb://group/{id}
fb://place/fw?pid={id}
fb://profile/{#user_id}/wall
fb://profile/{#user_id}/info
fb://profile/{#user_id}/photos
fb://profile/{#user_id}/mutualfriends
fb://profile/{#user_id}/friends
fb://profile/{#user_id}/fans
fb://search
fb://friends
fb://pages
fb://messaging
fb://messaging/{#user_id}
fb://online
fb://requests
fb://events
fb://places
fb://birthdays
fb://notes
fb://places
fb://groups
fb://notifications
fb://albums
fb://album/{%s}?owner={#%s}
fb://video/?href={href}
fb://post/{postid}?owner={uid}¹

¹ where postid is in the uid_postid f

1 thought on “Launch Facebook page in Facebook app on Android

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s