Hi, I am trying to use oauth with the rares-branch Ruby gem. I keep getting the error:
instance of OAuth::Consumer needs to have method `marshal_load'
My code, activate.rb is below. Any thoughts on how to fix this? THANKS! -Henry
require 'oauth/consumer'
def index
@consumer = OAuth::Consumer.new("CONSUMER KEY","CONSUMER SECRET", {
:site => "http://api.netflix.com",
:request_token_url => "https://api-user.netflix.com/oauth/request_token",
:access_token_url => "http://api.netflix.com/oauth/access_token",
:authorize_url => "https://api-user.netflix.com/oauth/login",
:application_name => "AppName"})
@request_token = @consumer.get_request_token
session[:request_token]=@request_token
session[:request_token_secret]=@request_token.secret
@authorize_url = @request_token.authorize_url({
:oauth_consumer_key => "CONSUMER KEY"
:application_name => "AppName",
:oauth_callback => "http://localhost:3000/activate/callback"
})
redirect_to @authorize_url
end
def callback
@request_token=OAuth::RequestToken.new(session[:request_token],
session[:request_token_secret])
@access_token = @request_token.get_access_token
end