react-native-wechat
react-native-wechat copied to clipboard
sendAuthRequest returns nothing
getWeChatUserInfo() {
console.log('>>>>>> getWeChatUserInfo')
const scope = 'snsapi_userinfo'
const state = 'aaaa'
WeChat.sendAuthRequest(scope, state).then((responseCode) => {
console.log(responseCode)
console.log('>> res', responseCode)
this.getWechatAccessToken(responseCode.code)
}).catch((err) => {
console.log('>> error', err)
Alert.alert('error something', err.message, [
{ text: '确定' }
])
})
}
Hi, when user presses login via wechat
button,
it triggers getWeChatUserInfo
.
but I can only see >>>>>> getWeChatUserInfo
this message.
sendAuthRequest is give me nothing.
RN 0.49.3 react-native-wechat 1.9.9
I have the same question
Do you fix the problem? I encounter the same problem!
sendAuthRequest,第一个参数用的是snsapi_userinfo,第二个参数没填。 我也遇到了一样的问题!
Same issue here
Same problem here
oh my god...someone fix this problem?
now the problem has solution , 中文请查看 #346 for english, the solution is checking your package name in the wechat dev platform, for example: the platform package name is 'com.wechat.demo', and your local WXEntryActivity file package name must be 'com.wechat.demo.wxapi'
@LiDevil also happened on iOS...