shareSDK分享 没有安装qq 微信的时候
来源:互联网 发布:物联网云计算运用 编辑:程序博客网 时间:2024/04/28 09:42
#import <ShareSDK/ShareSDK.h>
#import "WXApi.h"
#import <TencentOpenAPI/QQApi.h>
- (IBAction)docShare:(id)sender {
NSArray *shareList = [ShareSDK getShareListWithType:
ShareTypeWeixiSession,
ShareTypeWeixiTimeline,
ShareTypeQQ,
nil];
//定义容器
id<ISSContainer> container = [ShareSDK container];
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
{
[container setIPadContainerWithView:sender
arrowDirect:UIPopoverArrowDirectionUp];
}
else
{
[container setIPhoneContainerWithViewController:self];
}
//定义分享内容
id<ISSContent> publishContent = nil;
NSString *contentString =contentShare;
NSString *titleString = titleShare;
NSString *urlString = urlShare;
NSString *description = summaryShare;
NSString *imagePath = [[NSBundle mainBundle] pathForResource:@"Icon@2x" ofType:@"png"];
publishContent = [ShareSDK content:contentString
defaultContent:@""
image:[ShareSDK imageWithPath:imagePath]
title:titleString
url:urlString
description:description
mediaType:SSPublishContentMediaTypeNews];
//定义分享设置
id<ISSShareOptions> shareOptions = [ShareSDK simpleShareOptionsWithTitle:@"分享内容" shareViewDelegate:nil];
[ShareSDK showShareActionSheet:container
shareList:shareList
content:publishContent
statusBarTips:NO
authOptions:nil
shareOptions:shareOptions
result:^(ShareType type, SSResponseState state, id<ISSPlatformShareInfo> statusInfo, id<ICMErrorInfo> error, BOOL end) {//返回事件
if (state == SSPublishContentStateSuccess)
{
NSLog(NSLocalizedString(@"TEXT_SHARE_SUC", @"分享成功!"));
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示"
message:@"分享成功"
delegate:self
cancelButtonTitle:@"OK"
otherButtonTitles:nil,nil];
[alert show];
}
else if (state == SSPublishContentStateFail)
{
if (type==24&&![QQApi isQQInstalled]) {
//分享到QQ
//没有安装qq
NSLog(NSLocalizedString(@"TEXT_SHARE_FAI", @"没有安装QQ!"), [error errorCode], [error errorDescription]);
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示"
message:@"没有安装QQ"
delegate:self
cancelButtonTitle:@"OK"
otherButtonTitles:nil,nil];
[alert show];
}else if ((type==22||type==23)&&![WXApi isWXAppInstalled]) {
//没有安装qq || 没有安装微信
NSLog(NSLocalizedString(@"TEXT_SHARE_FAI", @"没有安装微信!"), [error errorCode], [error errorDescription]);
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示"
message:@"没有安装微信"
delegate:self
cancelButtonTitle:@"OK"
otherButtonTitles:nil,nil];
[alert show];
}else {
NSLog(NSLocalizedString(@"TEXT_SHARE_FAI", @"分享失败!"), [error errorCode], [error errorDescription]);
NSLog(NSLocalizedString(@"TEXT_SHARE_SUC", @"分享成功!"));
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示"
message:@"分享失败"
delegate:self
cancelButtonTitle:@"OK"
otherButtonTitles:nil,nil];
[alert show];
}
}
}];
}
- shareSDK分享 没有安装qq 微信的时候
- shareSDK分享 没有安装qq 微信的时候
- shareSDK qq 微信分享
- ShareSdk OneKeyShare 点击界面变暗 但是没有分享菜单 以及 微信和qq分享的appkey问题
- ShareSDK分享到微信、微信朋友圈、QQ
- 第三方 ShareSdk QQ、微信分享
- iOS:判断设备上是否安装微信或qq 集成微信SDK的时候判断是否安装微信 基于ShareSDK
- android ShareSDK分享,QQ,微信,新浪等分享
- 使用ShareSDK无法微信分享的解决方法,sharesdk分享
- ShareSDK社会化分享判断是否安装微信、QQ等客户端
- sharesdk微信分享
- sharesdk微信分享
- sharesdk微信分享
- ShareSDK集成微信、QQ、微博分享
- Unity3d 4.6.8 ShareSDK 分享新浪,微信,qq,经验总结
- H5app应用调用shareSDK分享到qq,微信,微博
- 使用shareSDK实现qq,微博,微信分享
- 使用shareSDK实现qq,微博,微信分享
- 如题,既然直接对一个实例发送方法名就可以调用这个方法,那为什么还要使用performSelector:去调呢?两者u有啥区别
- ios左右滑动页面刷新
- 什么是RabbitMQ?
- java环境下:MongoDB的crud操作之Update (一)
- uilabel显示html
- shareSDK分享 没有安装qq 微信的时候
- ios返回刷新原页面
- 将博客搬至CSDN
- 12.7.3 使用计算表达式进行重构
- ios7 uiscrollview不能滚动
- iOS自定义相册
- 银行支付总结
- Abstract Factory 抽象工厂设计模式
- codeforces 294B Shaass and Bookshelf (暴力dp)