I am new in Rails! I am using Omniauth and so far, nobody has done any TripIt strategies.
TripIt uses oAuth 1.0 and there is a omniauth-oauth that i am using!
So far i have this code:
require 'omniauth-oauth'
require 'multi_xml'
module OmniAuth
module Strategies
class Tripit < OmniAuth::Strategies::OAuth
option :name, "tripit"
option :client_options, {
:site => 'https://api.tripit.com',
:request_token_path => '/oauth/request_token',
:access_token_path => '/oauth/access_token',
:authorize_path => '/oauth/confirm_access'
}
uid do
request.params['username']
end
info do
{
:email => raw_info['feed']['entry']['content']['Email']['EmailAddress']
}
end
extra do
{ 'raw_info' => raw_info }
end
def raw_info
#@raw_info ||= MultiXml.parse(access_token.get("https://api.constantcontact.com/ws/customers/" + request.params['username'] + "/settings/emailaddresses").body)
end
end
end
end
I get an error:
consumer key not present in request
Any help on that?
Take a look at: omniauth-tripit . It was just released.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.