iOS开发第三方登录没安装对应的APP时,要隐藏或者被拒

判断第三方登录 是否安装APP,没安装则不显示,PS我用的ShareSDK

- (void)isHidenThirdBtn
{
    BOOL WXinstalled =  [WXApi isWXAppInstalled];
    BOOL QQinstalled = [TencentOAuth  iphoneQQInstalled];
    if (!WXinstalled && !QQinstalled) {
        self.winChatButton.hidden = YES;
        self.qqButton.hidden = YES;
    }
    if (!WXinstalled && QQinstalled) {
        self.winChatButton.hidden = YES;
    }
    if (WXinstalled && !QQinstalled) {
        self.qqButton.hidden = YES;
    }
    
}

你可能感兴趣的:(iOS开发第三方登录没安装对应的APP时,要隐藏或者被拒)