openshare icon indicating copy to clipboard operation
openshare copied to clipboard

appid转换成16进制不够8位分享不了QQ平台问题

Open Charles2016 opened this issue 7 years ago • 0 comments

因为我的QQappid转成16进制时没够8位,这个第三方不会自动去补位,导致我分享qq平台时,只是打开QQ而已,并没有对应的分享操作。然后我直接在这个方法做了修改,最后分享成功。希望能给后来者一些帮助,感谢作者分享。另外有个问题,微信分享的为什么返回自己APP的按钮点了没反应,回不到自己的APP,还有QQ登录再请求api获取不到用户头像url,请求借口如下:https://graph.qq.com/user/get_user_info?access_token=xx& openid=xxx&appid=xxx&format=json。 +(void)connectQQWithAppId:(NSString *)appId{ NSMutableString *appIdx = [NSMutableString stringWithFormat:@"%02llx", [appId longLongValue]]; while (appIdx.length < 8) { [appIdx insertString:@"0" atIndex:0]; } [appIdx insertString:@"QQ" atIndex:0]; appIdx = appIdx.uppercaseString;

[self set:schema Keys:@{@"appid":appId,@"callback_name":appIdx}];

}

Charles2016 avatar Jan 18 '18 07:01 Charles2016