7

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.

Shaik Khader
  • 397
  • 4
  • 19
  • There is no officially supported way to do it. And there is no way at all to do it with app scoped user ids. – WizKid Jan 28 '15 at 04:09
  • - It seems to be working with earlier versions of app , so i guess there must be some work around or this is an issue with fb app . – Shaik Khader Jan 28 '15 at 04:23
  • After launching Graph API, FB does not provide this type of feature. – Umang Kothari Jan 28 '15 at 06:26
  • I used graph api and found user id a particular account , and then passed the same . As i mentioned it works before FB version 25 not after , any other solution to launch particular page will help me resolve this issue – Shaik Khader Jan 28 '15 at 06:46
  • @jiyotweeter hey...I am having same issue but not with all user Ids, some user ids work with given URI and some don't. FB app shows content not available message. Did you find any solution? – mrsus Feb 02 '15 at 09:46
  • yes @MrSuS fb://page/{id} worked for me , i think in your case the page settings might be the issue , settings needs to be change for page account . As in your case it is happening only for few pages . Not sure. – Shaik Khader Feb 02 '15 at 15:28

1 Answers1

11

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);
humbleAlex
  • 146
  • 1
  • 4