0

I try to open a facebook profile (in the Facebook App) out of my Android App. I use Android Intent and found this approach: fb://profile/<username> but this only opens the facebook app. When I use just fb://profile/ it opens my own profile. If I use fb://profile/4 it opens Zuckerbergs profil.

But how can I open Zuckerbergs profile just with his username "zuck" (so something like fb://profile/zuck)?

Thanks for help!

Daniel
  • 101
  • 1
  • 3
  • 15
  • You probably can’t, because you are not supposed to work with usernames any more to begin with. The API doesn’t even return it any more, so it would be questionable where you’d want to get it from in the first place. – CBroe Mar 18 '20 at 13:27
  • @Cbroe I do not use the API to get the username. Just need to open the profile with help of the username. I think Facebook won't get rid of the username system. So I think it must be possible to open the profile this way..at least I hope so – Daniel Mar 19 '20 at 09:42
  • Facebook does not want you to be able to link to or open just any arbitrary user profile from within your app any more. For the web, they have explicitly created a mechanism that needs you to get the user’s permission first, so that you can then get a special link with a token, that will _redirect_ the human visitor to the real profile address, and even that is supposed to work only if the users are friends. I don’t think it would make sense if they still provided any _less_ restricted way to access user profiles in a native mobile app. – CBroe Mar 19 '20 at 09:57
  • @CBroe ok thanks for these informations! I think the best way would be, if Facebook would check if the App is installed and send the user back to the Facebook App and not to m.facebook.com. The most social networks handle it this way, I don't know why Facebook doesn't... – Daniel Mar 19 '20 at 14:58

0 Answers0