Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Charles2016 opened this issue Jan 18, 2018 · 0 comments
Open

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

Charles2016 opened this issue Jan 18, 2018 · 0 comments

Comments

@Charles2016
Copy link

Charles2016 commented Jan 18, 2018

因为我的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 Charles2016 changed the title appid转换成16进制不够8位时分享不了QQ平台的 appid转换成16进制不够8位分享不了QQ平台问题 Jan 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant