fb://profile/{userid} seems to be not working
Asked Answered
P

1

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.

Preconscious answered 28/1, 2015 at 3:40 Comment(6)
There is no officially supported way to do it. And there is no way at all to do it with app scoped user ids.Keel
- 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 .Preconscious
After launching Graph API, FB does not provide this type of feature.Levitan
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 issuePreconscious
@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?Hers
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.Preconscious
C
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);
Conductive answered 28/1, 2015 at 19:9 Comment(3)
Thank you , let me try thisPreconscious
@Conductive thanks for this answer, its working fine, let me know, the user doesn't install facebook app, in this case i need to redirect him to mobile browser. For this case how can i handle.Concinnate
@Concinnate I added your question to the answer.Conductive

© 2022 - 2024 — McMap. All rights reserved.