Home  >  Q&A  >  body text

64位 - QQ iOS sdk2.3.1 调用sendReq后进入qq,无分享对话框

我之前用的是旧的SDK,分享是完全正常的,现在为了兼容64位,换用最新版的TencentOpenApi SDK,就是2.3.1,就出问题了,跳转到手机QQ界面后,没有分享对话框,就好像简单的打开手机QQ一样。下面是代码,完全一样,

QQApiNewsObject *messge = [[QQApiNewsObject alloc] init];
   messge.url = [NSURL urlWithStr:self.url];
   messge.title = self.title;
   messge.description = self.shareDesc;
   messge.previewImageData = [self shareImageData];

   SendMessageToQQReq *req = [SendMessageToQQReq reqWithContent:messge];
   //将内容分享到qqzone
   //    [QQApiInterface SendReqToQZone:req];
   //将内容分享给qq好友
   [QQApiInterface sendReq:req];

另外,我使用32位的2.3.1SDK也有同样的问题。求救!!2月1号是苹果要求支持64位的最后一天,现在很着急。请大牛指点指点啊~

大家讲道理大家讲道理2766 days ago263

reply all(3)I'll reply

  • 巴扎黑

    巴扎黑2017-04-17 13:40:04

    Found the reason, the writing method is wrong, 2.3.1 must use the class method to generate the QQApiNewsObject object, you cannot alloc init first, and then assign a value to each attribute, but the old SDK can! ! It’s OK if I change it to this:

    QQApiNewsObject *messge = [QQApiNewsObject objectWithURL:[NSURL urlWithStr:self.url]
                                                      title:self.title
                                                description:self.shareDesc
                                           previewImageData:[self shareImageData]];
    

    reply
    0
  • 迷茫

    迷茫2017-04-17 13:40:04

    I have not encountered your situation. It is recommended to take a look at the environment setup and check

    reply
    0
  • PHPz

    PHPz2017-04-17 13:40:04

    Not encountered, please check
    messge.url = [NSURL urlWithStr:self.url];
    messge.title = self.title;
    messge.description = self.shareDesc;
    message.previewImageData = [self shareImageData];
    Check if these data are transmitted correctly

    reply
    0
  • Cancelreply