1。基于ShareSDK
#import <ShareSDK/ShareSDK.h>
#import "WXApi.h"
#import <TencentOpenAPI/QQApi.h>
if ([WXApi isWXAppInstalled]) {
//判断是否有微信
}
if ([QQApi isQQInstalled]) {
//判断是否有qq
}
2.基于系统
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"Sinaweibo://"]]) {
//新浪微博
}
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"Whatapp://"]]) {
//微信
}
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"weixin://"]]) {
//微信
}
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"Facebook://"]]) {
}
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"Twitter://"]]) {
//推特
}