Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix for Renren strategy #482

Merged
merged 1 commit into from

4 participants

@yzhang

Seems renren strategy is broken, and this fix works for me.

@ukisami

I also encountered this problem. Thanks for the patch. It worked for me as well.

@nated

Thanks for the fix! This cleared up the errors I was getting too.

@mbleigh mbleigh merged commit a7434b9 into intridea:1.0-beta
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 23, 2011
  1. @yzhang

    fix renren strategy

    yzhang authored
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 3 deletions.
  1. +4 −3 oa-oauth/lib/omniauth/strategies/oauth2/renren.rb
View
7 oa-oauth/lib/omniauth/strategies/oauth2/renren.rb
@@ -17,8 +17,9 @@ class Renren < OmniAuth::Strategies::OAuth2
# @option options [String] :scope ('publish_feed,status_update') comma-separated extended permissions such as `publish_feed` and `status_update`
def initialize(app, client_id=nil, client_secret=nil, options={}, &block)
client_options = {
- :authorize_url => 'http://graph.renren.com/oauth/authorize',
- :token_url => 'http://graph.renren.com/oauth/token',
+ :authorize_url => '/oauth/authorize',
+ :token_url => '/oauth/token',
+ :site => 'http://graph.renren.com/'
}
super(app, :renren, client_id, client_secret, client_options, options, &block)
end
@@ -53,7 +54,7 @@ def signed_params
end
def session_key
- @session_key ||= MultiJson.decode(@access_token.get('/renren_api/session_key'))
+ @session_key ||= MultiJson.decode(@access_token.get("/renren_api/session_key?oauth_token=#{@access_token.token}").body)
end
def request_phase
Something went wrong with that request. Please try again.