We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
我在用最新的libWeChatSDK时发现分享后返回的回调值始终是成功
请问我如何判断用户取消了分享还是真的分享出去了呢
因为这个逻辑涉及到我们游戏里面是否给用户发放奖励
以下是我回调时使用的代码,而取消和成功时messageResp.errCode始终是0
-(void) onResp:(BaseResp*)resp{ NSLog(@"wx resp data code:%d str:%@",resp.errCode,resp.errStr); if ([resp isKindOfClass:[SendMessageToWXResp class]]) { SendMessageToWXResp *messageResp = (SendMessageToWXResp *)resp; int result = 0; NSString* userId = NULL; if(__wxTransactionUserId && [__wxTransactionUserId isKindOfClass:[NSString class]] && [__wxTransactionUserId hasPrefix:@"userId="]){ userId = [__wxTransactionUserId substringFromIndex:7]; } if (messageResp.errCode== 0) { result = 1; }else if (messageResp.errCode== -2) { //取消不会走这里? }else { } if(userId){ char tmp[255]= {0}; const char* tcode = [userId UTF8String]; sprintf(tmp, "app.weChat.onShareResp('%s', %d)",tcode,result); se::ScriptEngine::getInstance()->evalString(tmp); } } __isWxLogin = false; }
The text was updated successfully, but these errors were encountered:
https://open.weixin.qq.com/cgi-bin/announce?action=getannouncement&key=11534138374cE6li&version=&lang=&token=
Sorry, something went wrong.
二楼正解
请问为什么我的项目不走微信的代理方法呢?我是按照微信开放平台的文档操作的(微信分享)。
No branches or pull requests
我在用最新的libWeChatSDK时发现分享后返回的回调值始终是成功
请问我如何判断用户取消了分享还是真的分享出去了呢
因为这个逻辑涉及到我们游戏里面是否给用户发放奖励
以下是我回调时使用的代码,而取消和成功时messageResp.errCode始终是0
The text was updated successfully, but these errors were encountered: