Is there a way to open a Facebook search link https://m.facebook.com/search/people/?q=Name
in Xamarin.Forms
with the Facebook app
or the Facebook Lite app
(whichever the user has installed) or with the default browser if no relevant app is installed that works with both Android and iOS?
Asked
Active
Viewed 398 times
0

Costas
- 459
- 3
- 15
-
Does this answer your question? [How to open Facebook / Twitter app from my iOS app in Xamarin?](https://stackoverflow.com/questions/38456618/how-to-open-facebook-twitter-app-from-my-ios-app-in-xamarin) – Shaw Jun 12 '22 at 22:34
-
Maybe partially. The first part of my question though is which which URL should I try to open with the Facebook apps. Should I try to open this one `https://m.facebook.com/search/people/?q=Name` or should I modify it? – Costas Jun 13 '22 at 08:09
-
Please take a look more accurate on a link that @Shaw mentioned. You should use `Launcher.TryOpenAsync("fb://{some_data})`. If it returns false, then Facebook app not installed and you need to open your link `https://m.facebook.com/search/people/?q=Name` via browser – choper Jun 13 '22 at 09:20
-
@choper In case the Facebook app (or the Facebook Lite app) is installed which link should I open with them? – Costas Jun 13 '22 at 10:13
-
Check the [latest answer](https://stackoverflow.com/a/67653826/10366303), not tested, but not the accepted one in the question I mentioned. About the search link, [this](https://stackoverflow.com/questions/5707722/what-are-all-the-custom-url-schemes-supported-by-the-facebook-iphone-app) might help? – Shaw Jun 13 '22 at 21:09
-
@Shaw The method for detecting if one of the apps is installed works fine. The URL I use is `fb://facewebmodal/f?href=https://www.facebook.com/search/people/?q=Name`. It works for the `Facebook app` but not for the `Facebook Lite app`. Is there any official documentation about the URL schemes the Facebook apps use? – Costas Jun 14 '22 at 05:42
-
Do not find the official documents for that. Maybe the link below would be helpful. https://stackoverflow.com/questions/43277564/string-uri-to-open-a-page-in-facebook-lite-app – Wendy Zang - MSFT Jun 17 '22 at 05:57
-
@WendyZang-MSFT Well, that must be outdated because the proposed solution `fb://facewebmodal/f?href=" + FACEBOOK_URL` does not work for me with the latest version of `Facebook Lite`. – Costas Jun 17 '22 at 10:24
-
@choper Is there a way to make the method of detection work only with Facebook app, since `Facebook Lite` does not support opening the same link? In case a user has only `Facebook Lite` installed then the browser should be used instead. – Costas Jun 19 '22 at 12:50
-
@Costas For now, i still have not find the url for Facebook Lite app. – Wendy Zang - MSFT Jun 22 '22 at 05:40
-
@WendyZang-MSFT I haven't either. Is there a way though to modify the check proposed here: https://stackoverflow.com/a/67653826/7360423 in order to open the URL with the default browser when an attempt to open it with Facebook Lite takes place? – Costas Jun 23 '22 at 06:47
-
hhh. Let's try it. – Wendy Zang - MSFT Jun 24 '22 at 03:34