使用ShareSDK分享到qq空间app has no privilege to use this

iOS 码拜 9年前 (2015-09-29) 1239次浏览
 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";
方案推荐指数:40

// NSString *ssQqSpaceAppKey = @”100371282″;

// NSString *ssQqSpaceAppSecret = @”aed9b0303e3ed1e27bae87c33761161d”;

如果用SDK里面原有的APPKey和AppSecret,是可以分享的是吧?请检查你的应用是否通过了开发平台的审核!


CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明使用ShareSDK分享到qq空间app has no privilege to use this
喜欢 (0)
[1034331897@qq.com]
分享 (0)