Facebook has deprecated the method [FBSDKMessengerSharer messengerPlatformCapabilities] that is used to check if the user has Messenger app installed. In the w
[FBSDKMessengerSharer messengerPlatformCapabilities]
For those using Swift 3, use this:
UIApplication.shared.canOpenURL(URL(string: "fb-messenger-api://")!)