程式碼如下:
/**
跳转到微信,并打开指定的URL
@return <#return value description#>
*/
+(BOOL) openWeChat:(NSString *)url
{
//wx0b577bb0399ff7d7
NSString *headString = @"weixin://";
headString = [headString stringByAppendingString:url];
BOOL canOpen = [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"weixin:/"]];
if(canOpen)
//打开微信
return [[UIApplication sharedApplication] openURL:[NSURL URLWithString:headString]];
return FALSE;
}
不可行,雖然微信有打開webview的scheme,但只有部分簽約用戶才能使用,需要帶上appid的