No commit activity in last 3 years
No release in over 3 years
Omniauth strategy for Renren
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0

Runtime

 Project Readme

Omniauth-xiaonei¶ ↑

Omniauth strategy for renren

Usage¶ ↑

gem install omniauth-xiaonei

具体用法请参照Omniauth和example文件夹下的client_side.rb:

gem install sinatra --no-rdoc --no-ri
ruby -rubygems client_side.rb

如果出现“forbidden”等问题,有可能是因为Omniauth-oauth2 1.1.0的bug,可以这样解决:

# 在Gemfile中加入这一行
gem "omniauth-oauth2", :git => "git://github.com/lastomato/omniauth-oauth2.git"
# 然后运行
bundle install

# 或者安装 1.0.2版本的Omniauth-oauth2
gem install --version "1.0.2" omniauth-oauth2

在config/initializers/omniauth.rb中,可以传入:fields参数,其值为字符串,作用是在认证结束阶段返回用户资料时指定返回的具体内容。可以参见人人的文档:wiki.dev.renren.com/wiki/Users.getInfo

下面是可以选的值:

“uid,name,sex,star,zidou,vip,birthday,tinyurl,headurl,mainurl,hometown_location,work_history,university_history”

如果不填,那么默认的值为:“uid,name,tinyurl,headhurl,zidou,star”

参数的具体含义请参照人人的文档(如上所示)。

Please refer to Omniauth for usage

Thanks¶ ↑

Author(s) of Omniauth-facebook and Omniauth.

License¶ ↑

MIT License

Copyright¶ ↑

Copyright © Jie Fan.