WeChat PHP API Example Class: Exchange messages with WeChat users

Recommend this page to a friend!
  Info   Documentation   View files (4)   Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2020-06-29 (1 month ago) Not yet rated by the usersTotal: 53 All time: 9,808 This week: 255
Version License PHP version Categories
wechat 1.0.0Custom (specified...5PHP 5, Web services, Chat
Description Author

This package can be used to exchange messages with WeChat users.

It can send HTTP requests to the WeChat API Web servers to perform operation that allow sending and receiving messages to WeChat chat service users.

Currently it can listen to text or event messages and assign a callback function that can be used by applications of this package to automate responses to those messages.

Picture of Zimo Xiao
  Performance   Level  
Name: Zimo Xiao <contact>
Classes: 2 packages by
Country: China China
Age: ???
All time rank: 427048 in China China
Week rank: 762 5 in China China

Details

<p align="center"><img width="320" src="https://xy.zuggr.com/file/angel_wechat.jpg"></p>

????

Angel?? ???Angel??????????

??

????Composer??Angel??:

composer create-project angel-project/framework .

????????:

composer require angel-project/wechat

GitHub php GitHub license

?????

???????/?????

  build::post('your/url',function(){

    $wx = new angel\wechat($appid,$secret,$token); //?????object

    $wx->listen('text','hi',function($input,$wx){
      $wx->return('text',[
        'to' => $input->FromUserName,
        'content' => 'hello!'
      ]);
    }); //?????hi???????hello!

    $wx->listen('event','subscribe',function($input,$wx){
      $wx->return('news',[
        'to' => $input->FromUserName,
        'articles' => [[
          'title' => 'hi!',
          'description' => 'long time no see',
          'picurl' => 'yoururl.com/img.jpg',
          'url' => 'yoururl.com'
        ]]
      ]); //????
    }); //???????????????

    $wx->run(); //????

  });

listen()???????? - ?????????text???????event?????? - ?????????????????????????SCAN?????subscribe?????CLICK???????????????????????????'empty'? - ??????????function?????????????object?????????????????????????????object???function???????????

????

  $wx = new angel\wechat($appid,$secret,$token); //?????object

  $menu = [[
    'type' => 'click',
    'name' => '????',
    'key' => 'welcome'
  ]]; //????click???????????????????????

  $at = $wx->access_token();  //??access token
  $wx->menu($at,$menu); //????

English Doc

Angel WeChat is a WeChat plugin based on Angel Framework

Installation

First, install Angel Framework with Composer using the following command:

composer create-project angel-project/framework .

Then, install Angel WeChat package:

composer require angel-project/wechat

GitHub php GitHub license

  Files  
File Role Description
composer.json Data Auxiliary data
LICENSE Lic. License text
README.md Doc. Documentation
wechat.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:53
This week:0
All time:9,808
This week:255

For more information send a message to info at phpclasses dot org.