开发者

vimeo ruby gem auth_token example for oAuth?

Anyone know what the correct syntax to get an auth_token from Vimeo using the recently updated vimeo gem (http://github.com/matthooks/vimeo) using oAuth?

I'm trying this:

def authorize
  base = Vimeo::Advanced::Base.new(VIMEO_API_KEY, VIMEO_SECRET)
  redirect_to base.web_login_link("delete")
end #end method

--- get redirected to vimeo, allow access, then get redirected to app with frob variable ---

def callback
  vimeo = Vimeo::Advanced::Auth.new(VIMEO_API_KEY, VIMEO_SECRET)
  auth_token = vimeo.get_token(params[:frob])
end

-- now I get the following error:

{"err"=>{"msg"=>"Missing required parameter", "code"=>"307", "expl"=>"A required parameter was missing: oauth_consumer_key"}, "stat"=>"fail", "generated_in"=>"0.0054"}

Anyone familiar with this gem or开发者_开发知识库 the correct syntax to get the auth_token for making authenticated calls in the future


Based on the documentation on authenticating as a website in the readme, it looks like you're missing a few steps. The github README should have the latest info, so I won't paste it here.

Are you trying to accomplish something other than the example given is showing you how to do?

Have you tried vendoring the code instead of using the gem? Perhaps recent updates weren't deployed as a gem yet, as it does look like OAuth is a new feature based on the github history.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜