I am trying to use oauth with a Riva-branch Ruby gem. I keep getting the error:
OAuth instance :: Consumer must have a marshal_load method
My code is activate.rb 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
Henry
source share