新浪微博开放平台新版接口sdk 支持站外与站内应用 oauth2
安装
Add this line to your application's Gemfile:
gem 'weibo_17up'
And then execute:
$ bundle
or
$bundle update
使用
配置文件: Rails.root + "/config/service.yml"
weibo:
production:
app_key: 'XXXXX446XXX'
app_secret: 'XXXXXX784a52b45XXXXXXXXXXXXXX'
redirect_uri: 'http://www.url.com/callback'
授权:
rest api 请求:
client = Weibo::Client.new(weibo_access_token, weibo_uid)
client.update("Hi! what are you doing!")
client.upload("Hi! what are you doing!", pic_path)
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Added some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request