If you need to open a Facebook page from your Android application you can do that in 2 ways:
- open it in the Browser
- open it in the Facebook app installed on the phone
- 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); - 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
Great article!!! 🙂
LikeLike