首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Iphone >

使用ShareSDK将信息分享到qq空间出现异常

2013-10-14 
使用ShareSDK将信息分享到qq空间出现错误2013-02-22 11:57:15.722 ProjectName[4308:19d03] 分享失败,错误

使用ShareSDK将信息分享到qq空间出现错误
2013-02-22 11:57:15.722 ProjectName[4308:19d03] 分享失败,错误码:100031,错误描述:app has no privilege to use this api
调用的函数是

    //shareContentWithShareList 直接将信息分享道qq空间中
    [ShareSDK shareContentWithShareList:[ShareSDK getShareListWithType:ShareTypeQQSpace,nil]
                                content:[ShareSDK publishContent:CONTENT
                                                  defaultContent:@""
                                                           image:[UIImage imageNamed:@"closeSel.png"] //分享的图片资源
                                                    imageQuality:0.8
                                                       mediaType:SSPublishContentMediaTypeNews
                                                           title:@"ShareSDK"
                                                             url:@"http://www.sharesdk.cn"
                                                    musicFileUrl:nil
                                                         extInfo:nil
                                                        fileData:nil]
                          statusBarTips:YES
                                 result:^(ShareType type, SSPublishContentState state, id<ISSStatusInfo> statusInfo, id<ICMErrorInfo> error, BOOL end) {
                                     if (state == SSPublishContentStateSuccess)
                                     {
                                         NSLog(@"分享成功");
                                     }
                                     else if (state == SSPublishContentStateFail)
                                     {
                                         NSLog(@"分享失败,错误码:%d,错误描述:%@", [error errorCode], [error errorDescription]);//最后程序在这里出现:分享失败,错误码:100031,错误描述:app has no privilege to use this api


                                     }
                                 }];


我已经对 ShareConfig.h 和 -Info.plist 做了相应的更改
#pragma mark - QQ空间应用配置信息
//http://connect.qq.com/intro/login/上申请加入QQ登录,并将相关信息填写到以下字段

// NSString *ssQqSpaceAppKey = @"100371282";
// NSString *ssQqSpaceAppSecret = @"aed9b0303e3ed1e27bae87c33761161d";

NSString *ssQqSpaceAppKey = @"100380964";
NSString *ssQqSpaceAppSecret = @"691532a5aae835e84ea67010e6bdfbb2";
qq空间分享失败
[解决办法]

// NSString *ssQqSpaceAppKey = @"100371282";
// NSString *ssQqSpaceAppSecret = @"aed9b0303e3ed1e27bae87c33761161d";
亲,你如果用SDK里面原有的APPKey和AppSecret,是可以分享的是吧?请检查你的应用是否通过了开发平台的审核!

热点排行