Git project recommendation | another PHP public platform development kit, Easy WeChat
It may be the most elegant public Platform SDK.
The enterprise ID is not supported. why? The API is too messy, so I am afraid I will be exhausted...
QQ group used by SDK: 319502940
QQ group for developers: 9179779
Features
- Naming is not so messy;
- Hide details that developers do not need to pay attention;
- The method is more elegant, so you don't have to study the usage of strange method names or class names;
- Custom cache mode;
- Compliance with the DSRs standard, you can easily integrate with your framework;
- Highly abstract message classes, eliminating the pain of json and xml;
- Detailed Debug logs make all interactions clear at a glance;
Install
Environment requirements: PHP> = 5.5.9
-
Use composer
composer require "overtrue/wechat:~3.0" -vvv
Use
Basic usage (take the server as an example ):
True, 'app _ id' => 'wx3cf0f39249eb0e60', 'secret' => 'f1c242f4f28f735d4687abb469072a29', 'token' => 'easychat ', 'log' => ['level' => 'debug', 'file' => '/tmp/easywechat. log',], //...]; $ app = new Application ($ options); $ server = $ app-> server; $ user = $ app-> user; $ server-> setMessageHandler (function ($ message) use ($ user) {$ fromUser = $ user-> get ($ message-> FromUserName); return "{$ fromUser-> nickname} Hello! Welcome to overtrue! ";}); $ Server-> serve ()-> send ();
For more information, see http://easywechat.org /.
Document
Http://easywechat.org/
We strongly recommend that you read the document and use this SDK again.
Framework integration
Laravel 5 expansion package: overtrue/laravel-wechat
Contribute code
Contribution guide
License
MIT