Coder Social home page Coder Social logo

usage clarification about wechat-jssdk HOT 4 CLOSED

dcsan avatar dcsan commented on September 11, 2024
usage clarification

from wechat-jssdk.

Comments (4)

JasonBoy avatar JasonBoy commented on September 11, 2024

the wx here at const wx = new WeChat(wechatInfo); has nothing to do with the tencent browser side wx object, here it's just a instance name of WeChat class, which is used to do the server side task, like getting the token, jsapi_ticket, manage token/ticket data..., you can use anything you want, e.g:
const myWechatInstance = new WeChat(wechatInfo);,

from wechat-jssdk.

dcsan avatar dcsan commented on September 11, 2024

tx for the quick response.
so the req.query.code above
is the code returned from the redirect / silent login?

https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421140842

I'm really just trying to get an openID, not the rest of the profile info.
Is the oAuth endpoint the only way to get that?

separate from that opening an oAuth signin from within a wechat official account (so we already have their permission and info) - will that skip the signin button popup for existing followers?

from wechat-jssdk.

JasonBoy avatar JasonBoy commented on September 11, 2024

checkout the implicit/slient oauth in the demo(demo/index.js), which does not need user's permission.
in / route to gen the implicit oauth url, and
in /implicit-oauth route(redirected here by wechat) to get the user base info with the code retrieved from the implicit oauth url redirect above

from wechat-jssdk.

JasonBoy avatar JasonBoy commented on September 11, 2024

Fire a new issue if you still have confusions👀

from wechat-jssdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.