Forum Xamarin.Forms

Facebook URL Schemes

MartinStievenartMartinStievenart USMember, University ✭✭


I have a function in my Forms application that should open a Facebook page in the Facebook application if installed.
For that i use :

try{ Device.OpenUri (new Uri("fb://page/page_id")); } catch(Exception e){ System.Diagnostics.Debug.WriteLine (e.Message); Device.OpenUri (new Uri("")); }

If the application is not installed or the scheme is not valid, i should go in the catch and open the Facebook page in the browser.

It works great on Android by the raise of an ActivityNotFoundException, but there isn't any exception raise for iOS (haven't try for WP yet).
Is this a normal comportement for iOS ?



Sign In or Register to comment.