I would like to open my facebook page through my android app on click of a button. I am currently using the following code: [ as answered here: Open Facebook page from Android app? ]
public static Intent newFacebookIntent(PackageManager pm, String url) {
Uri uri = Uri.parse(url);
try {
ApplicationInfo applicationInfo = pm.getApplicationInfo("com.facebook.katana", 0);
if (applicationInfo.enabled) {
// https://stackoverflow.com/a/24547437/1048340
uri = Uri.parse("fb://facewebmodal/f?href=" + url);
}
} catch (PackageManager.NameNotFoundException ignored) {
}
return new Intent(Intent.ACTION_VIEW, uri);
}
I am able to load the page too in facebook app but, it just shows 'About' section, photos and recent posts. I cant see cover page or like button there. If I manually open facebook app (not through my android app), and visit my page everything displays fine, but problem comes up when i try to link facebook page with my app. Anyone has idea what am i doing wrong and why cant i see the like button? I've been trying to figure this out since 2 days but no luck! Thanks in advance