from my Android app, I would like to open a link to a Facebook profile in the official Facebook app (if the app is installed, of course). For iPhone, there exists the fb://
URL scheme, but trying the same thing on my Android device throws an ActivityNotFoundException
.
Is there a chance to open a Facebook profile in the official Facebook app from code?
I implemented in this form in webview using fragment- inside oncreate:
and outside onCreateView :
This has been reverse-engineered by Pierre87 on the FrAndroid forum, but I can't find anywhere official that describes it, so it's has to be treated as undocumented and liable to stop working at any moment:
You can open the facebook app on button click as follows:-