IOS 检测是否安装Facebook

    BOOL isInstalled = [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"fb://"]];

    if (!isInstalled) {
        //没有安装Facebook
    }else{
        //安装了Facebook
    }
注意事项

1.得在info.plist将fb加入白名单,否则检测无效

    LSApplicationQueriesSchemes
    
        fb
    

你可能感兴趣的:(IOS 检测是否安装Facebook)