WeChat PHP API Example Class: Exchange messages with WeChat users

Recommend this page to a friend!

  Author Author  
Name: Zimo Xiao <contact>
Classes: 2 packages by
Country: China China


  Detailed description   Download Download .zip .tar.gz  
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.

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


  Classes of Zimo Xiao  >  WeChat PHP API Example Class  >  Download Download .zip .tar.gz  >  Support forum Support forum  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: WeChat PHP API Example Class
Base name: wechat
Description: Exchange messages with WeChat users
Version: -
PHP version: 5
License: Custom (specified in a license file)
 
  Groups   Applications   Files Files  

  Groups  
Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes
Group folder image Web services Web data clipping, SOAP or XML-RPC clients and servers View top rated classes
Group folder image Chat Chating and instant messaging View top rated classes


  Applications that use this package  
No pages of applications that use this class were specified.

Add link image If you know an application of this package, send a message to the author to add a link here.

  Files folder image Files  
File Role Description
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation
Plain text file wechat.php Class Class source

Download Download all files: wechat.tar.gz wechat.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.

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