How to detect if Facebook app is installed on iOS? [duplicate] How to detect if Facebook app is installed on iOS? [duplicate] ios ios

How to detect if Facebook app is installed on iOS? [duplicate]


BOOL isInstalled = [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"fb://"]]if (isInstalled) {} else {}


Try just using the canOpenURL: function

NSURL *fbURL = [NSURL URLWithString:@"fb://"];//or whatever url you're checkingif ([[UIApplication sharedApplication] canOpenURL:fbURL]){  //open it etc  }