GithubHelp home page GithubHelp logo

luogan129 / codetoany Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 111 KB

微信公众号平台网页授权接口中获取到的授权code传递给(即一个微信公众号网页授权给)任何其他多个回调域名下的url,解决了只能设置一个网页授权回调域名的问题,解决了redirect_uri参数错误的问题。

Home Page: http://lionsay.com/codetoany.html

PHP 100.00%

codetoany's Introduction

CodeToAny一个微信公众号网页授权给任何域名下的url

把从微信网页授权接口中获取到的授权code以get参数的形式传递给任何域名下的url。

联系作者

打赏捐赠

如果您觉得本程序不错,欢迎打赏我给予小小的支持,谢过!谢谢卖萌

支付宝二维码    微信二维码

成功案例

微擎、微赞、discuz插件、wordpress插件

环境需求

  • php >= 5.4.0(小于5.4.0的情况可以联系作者解决);

极速使用

  1. 假设将网页授权回调域名设置为www.test.com
  2. 编辑codetoany/getcode.php,将变量$appId的值修改为自己的微信公众号AppId
  3. 将文件夹codetoany中的所有文件部署到http://www.test.com/codetoany/
  4. 在微信内或使用微信web开发者工具访问http://www.test.com/codetoany/getcode.php?auk=demo1,顺利的话,页面将跳转到类似这样的url:http://lionsay.com/?abc=123&code=0318PVx00bTFzB1JOny00YMRx008PVxS&state=STATE

攻略指南

  1. ?auk=demo1中的aukdemo1以及此时的授权url(即接收授权code的url,最终跳转的url)都是可以自定义的;
  2. 网页授权接口中的get参数scopestate可以以get参数的形式传递给codetoany/getcode.php,程序会把它们再传递给接口;
  3. 除了get参数auk外,传递给codetoany/getcode.php的任何get参数都会以get参数的形式再传递给授权url
  4. 如果网页授权回调域名使用https协议访问,那么程序需要略微调整才可以正常使用;

郑重声明

  • 本程序仅供学习研究使用,不得用于非法用途,否则后果自负;
  • 对于由本程序导致的一切法律和安全问题,作者不承担任何责任;

codetoany's People

Contributors

lionskys avatar

Watchers

 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.