Check if user has Facebook Messenger installed iOS 9

前端 未结 4 652
日久生厌
日久生厌 2020-12-17 02:44

Facebook has deprecated the method [FBSDKMessengerSharer messengerPlatformCapabilities] that is used to check if the user has Messenger app installed. In the w

4条回答
  •  粉色の甜心
    2020-12-17 03:01

    In my case I needed to know whether to show a button users could press to share content on messenger. This worked for my case, and it also checks whether the messenger app is installed.

    -(BOOL) canShareViaMessenger {
        [[[FBSDKMessageDialog alloc] init] canShow]
    }
    

提交回复
热议问题