react-native-wechat icon indicating copy to clipboard operation
react-native-wechat copied to clipboard

sendAuthRequest returns nothing

Open miriyas opened this issue 7 years ago • 8 comments

  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

miriyas avatar Nov 13 '17 08:11 miriyas

I have the same question

zhangleiwant avatar Nov 25 '17 09:11 zhangleiwant

Do you fix the problem? I encounter the same problem!

renrenguiwei avatar Dec 15 '17 07:12 renrenguiwei

sendAuthRequest,第一个参数用的是snsapi_userinfo,第二个参数没填。 我也遇到了一样的问题!

caik123 avatar Dec 21 '17 07:12 caik123

Same issue here

msheldon avatar Mar 09 '18 06:03 msheldon

Same problem here

JiayiZhaoUofT avatar Sep 23 '19 20:09 JiayiZhaoUofT

oh my god...someone fix this problem?

LiDevil avatar Oct 11 '19 09:10 LiDevil

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 avatar Oct 11 '19 14:10 LiDevil

@LiDevil also happened on iOS...

loveholly avatar Feb 24 '20 22:02 loveholly