freyo / Entwechat
Licence: mit
📦 WeChat Enterprise SDK based on EasyWeChat 3.X
Stars: ✭ 12
Labels
Projects that are alternatives of or similar to Entwechat
Wechat
WeChat SDK for Go (微信SDK:简单、易用)
Stars: ✭ 3,144 (+26100%)
Mutual labels: wechat-sdk, sdk, wechat
Weixinmpsdk
微信全平台 SDK Senparc.Weixin for C#,支持 .NET Framework 及 .NET Core、.NET 6.0。已支持微信公众号、小程序、小游戏、企业号、企业微信、开放平台、微信支付、JSSDK、微信周边等全平台。 WeChat SDK for C#.
Stars: ✭ 7,098 (+59050%)
Mutual labels: wechat-sdk, sdk, wechat
Oss.clients.sns
社交网站sdk(标准库),微信公众号(订阅号,服务号,小程序)接口sdk-包含消息回复(明文和安全模式),Oauth2.0授权等
Stars: ✭ 136 (+1033.33%)
Mutual labels: wechat-sdk, sdk, wechat
Yii2 Easy Wechat
WeChat SDK for yii2 , based on overtrue/wechat.
Stars: ✭ 188 (+1466.67%)
Mutual labels: wechat-sdk, wechat
Wechat
轻量的微信公众号组件(A Lightweight Wechat Component)
Stars: ✭ 195 (+1525%)
Mutual labels: wechat-sdk, wechat
Laravel Wechat
微信 SDK for Laravel, 基于 overtrue/wechat
Stars: ✭ 2,690 (+22316.67%)
Mutual labels: wechat-sdk, wechat
Abp.wechat
Abp 微信 SDK 模块,包含对微信小程序、公众号、企业微信、开放平台、第三方平台等相关接口封装。
Stars: ✭ 168 (+1300%)
Mutual labels: wechat-sdk, wechat
React Native Wechat
🚀 WeChat login, share, favorite and payment for React-Native on iOS and Android platforms (QQ: 336021910)
Stars: ✭ 2,842 (+23583.33%)
Mutual labels: wechat-sdk, wechat
Wepay
轻量的微信支付组件(A Lightweight Wechat Pay Component)
Stars: ✭ 343 (+2758.33%)
Mutual labels: wechat-sdk, wechat
Go Workwx
a sensible Work Weixin(企业微信, Wechat Work) SDK for Go
Stars: ✭ 181 (+1408.33%)
Mutual labels: wechat-sdk, wechat
Weixin Java Cp Demo
基于Spring Boot 和 WxJava 实现的微信企业号/企业微信 后端Demo
Stars: ✭ 175 (+1358.33%)
Mutual labels: wechat-sdk, wechat
Diplomat
整合第三方 SDK 微信、微博、 QQ 等为统一的 Diplomat 接口。
Stars: ✭ 672 (+5500%)
Mutual labels: wechat-sdk, wechat
Weixin Java Miniapp Demo
基于Spring Boot 和 WxJava 实现的微信小程序Java后端Demo
Stars: ✭ 779 (+6391.67%)
Mutual labels: wechat-sdk, wechat
EntWeChat
WeChat Enterprise SDK based on EasyWeChat 3.X
Requirement
- PHP >= 5.5.9
- composer
- openssl 拓展
- fileinfo 拓展(素材管理模块需要用到)
SDK 对所使用的框架并无特别要求
Installation
composer require "freyo/entwechat" -vvv
Usage
使用示例:
<?php
use EntWeChat\Foundation\Application;
$options = [
'debug' => true,
'corp_id' => 'wx3cf0f39249eb0e60',
'secret' => 'Nyn7Yuw-YbqDZeWiWZM6HqghGkXTFdZbaXpnk6w4G1IQwgtTuOl_TN09ciwpQ-5X',
// ...
];
$app = new Application($options);
//微信端网页授权
$app->oauth->setRedirectUrl('http://example.org')
->scopes(['snsapi_base'])
->redirect()
->send();
//获取授权用户信息
$user = $app->oauth->user();
//$user->UserId //企业成员授权时
//$user->DeviceId
//$user->OpenId //非企业成员授权时
//PC端扫码登录
$app->auth->with(['usertype' => 'member'])
->setRedirectUrl('http://example.org')
->redirect()
->send();
//获取登录用户信息
$user = $app->auth->user();
//登录用户为企业号成员时
//$user->usertype
//$user->user_info['userid'] //name,email,avatar
//$user->redirect_login_info['login_ticket']
//$user->corp_info['corpid']
//通过userid获取用户信息
$app->user->get('userid');
//获取指定部门id下成员
$deptId = 0;
$app->user->lists($deptId);
//获取部门列表
$app->user_department->lists();
//获取标签列表
$app->user_tag->lists();
//获取指定标签id下成员
$tagId = 0;
$app->user_tag->usersOfTag($tagId);
//发送消息给指定用户通过指定应用id
$news = new \EntWeChat\Message\News([
'title' => '图文标题',
'description' => '图文描述',
'url' => 'http://example.org',
'image' => 'http://mat1.gtimg.com/cq/js/news/tina/wenhua2.jpg',
]);
$agentId = 0;
$app->broadcast->message($news)->by($agentId)->toUser('userid')->send(); //单图文
$app->broadcast->message([$news, $news])->by($agentId)->toUser('userid')->send(); //多图文
$app->broadcast->message($news)->by($agentId)->toAll()->send(); //发送给所有人
$app->broadcast->message($news) //发送给指定用户、部门、标签
->by($agentId)
->toUser('userid1', 'userid2')
->toParty($deptId)
->toTag($tagId)
->send();
//服务端回调
$server = $app->server;
$user = $app->user;
$server->setMessageHandler(function($message) use ($user) {
// $message->FromUserName // 用户的 openid
// $message->MsgType // 消息类型:event, text....
$fromUser = $user->get($message->FromUserName);
return "{$fromUser->nickname} 您好!欢迎关注!";
});
$server->serve()->send();
文档完善中。
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].