2017 © Pedro Peláez
 

symfony-bundle wechat-bundle

Wechat authentication/profile management bundle

image

jean553/wechat-bundle

Wechat authentication/profile management bundle

  • Saturday, May 2, 2015
  • by jean553
  • Repository
  • 1 Watchers
  • 1 Stars
  • 39 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 3 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Build Status Scrutinizer Code Quality Code Coverage, (*1)

MIT License, (*2)

WechatBundle

PHP Bundle for WeChat. By developing applications, it is often required to call WeChat services ( like get all connected user information, authorize an user to connect... etc... ). The goal of this bundle is to group them all., (*3)

The latest version of the bundle can handle : - get all the necessary token for both of Oauth2 and Wechat JS API communication - authorize an user to connect by checking Wechat account - get current connected user WeChat information ( nichname, location, image... ), (*4)

Note : if you want be able to handle WeChat wall/friends sharing features, please use my other JavaScript project WechatJS with the current bundle., (*5)

Note : bundle development ongoing tasks are all availables in this Github issues section., (*6)

Installation

The latest version of the bundle can be downloaded through Composer :, (*7)

"require": {
    "jean553/wechat-bundle": "dev-master"
}

Use

Use the bundle in your project :, (*8)

use jean553\WechatBundle\Services\WechatService;

Connect to the WeChat authentication service OAuth2. Use your application id ( appid ) and secret passphrase ( secret ) available on your WeChat Public Account ( https://mp.weixin.qq.com/ )., (*9)

$wechatService = new WechatService();

$authentication = $wechatService->authorize(
    $appid,
    $secret
);

if(!$authentication) {
    return new Response('WeChat connection error.');
}

Get the current user information., (*10)

$user = $wechatService->getUserInformation();

$user is an array which contains the following items : - openid : user WeChat openid - nickname : WeChat nickname of the user - sex - language - city - province - country - headimgurl : absolute path of the user profile picture - privilege, (*11)

Run the tests

bin/phpunit jean553/WechatBundle

The Versions

02/05 2015

dev-master

9999999-dev https://github.com/jean553/WechatBundle

Wechat authentication/profile management bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jean LELIEVRE

symfony oauth2 wechat

02/05 2015

v0.5.0

0.5.0.0 https://github.com/jean553/WechatBundle

Wechat authentication/profile management bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jean LELIEVRE

symfony oauth2 wechat