微信Rails

微信API access_token 验证 weixin_authorize

 ̄綄美尐妖づ 提交于 2019-11-29 06:19:11
https://github.com/lanrion/weixin_authorize WeixinAuthorize Installation Add this line to your application's Gemfile: gem 'weixin_authorize' And then execute: $ bundle Or install it yourself as: $ gem install weixin_authorize Usage Init a client $client ||= WeixinAuthorize.configure do |config| config.app_id = ENV["APPID"] config.app_secret = ENV["APPSECRET"] config.expired_at = Time.now.to_iend# Or$client ||= WeixinAuthorize::Client.new(ENV["APPID"], ENV["APPSECRET"]) 获取用户管理信息 获取用户基本信息 user_info = $client.user(ENV["OPENID"]) 获取关注者列表 followers = $client.followers 分组管理接口 创建分组: group = $client