Coder Social home page Coder Social logo

getcode's Introduction

getCode

getWeixinCode and getQQCode 获取微信授权和qq授权的中转页

假设域名是 www.Jrrr.com

微信授权地址

https://www.Jrrr.com/get-weixin-code.html?appid=appid&scope=snsapi_userinfo&state=state&redirect_uri=uri

使用http或者https都可以,公众号需要配置“网页授权域名”

参数 说明
appid 公众号appid
scope snsapi_userinfo 需要用户授权,能拿到用户头像和昵称等信息,snsapi_base 只能拿到openid(unionID不能)
state 填写state就行,重定向后会带上state参数,可以填写a-zA-Z0-9的参数值,最多128字节
redirect_uri 回调的url,会带上code,和from(自己加上去的区分微信(weixin)还是qq(qq))

qq授权地址

https://www.Jrrr.com/get-qq-code.html?client_id=client_id&redirect_uri=redirect_uri&state=state&display=mobile

使用http或者https都可以,腾讯开放平台或者qq互联需要配置“网页授权域名” | 参数 | 说明 | | :--- | :--- | | client_id | 网页应用的appid(需要在 腾讯开放平台或者qq互联 创建) | | state | 填写state就行,重定向后会带上state参数,可以填写a-zA-Z0-9的参数值,最多128字节 | | display | 填写mobile就行,默认为PC端样式,mobile为手机端样式 | | redirect_uri | 回调的url,会带上code,和from(自己加上去的区分微信(weixin)还是qq(qq)) |

getcode's People

Watchers

James Cloos avatar  avatar

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.