문제

I am using devise/omniauth-foursquare and have recently run into difficulties now that foursquare is requesting the version parameter with every request. I get this error on everything:

Foursquare::Error (A required parameter was missing or a parameter was malformed. This is also used if the resource ID in the path is incorrect.):

I know with the recent foursquare update I need to add the v=20131016 parameter to all my requests, but I am not sure how to add it.

My devise configuration looks like this:

require 'omniauth-foursquare'
config.omniauth :foursquare, "[MY_APP_ID]", "[MY_SECRET_ID]"

I also access foursquare like this:

  def foursquare
    @foursquare ||= Foursquare::Base.new(fs_app_id, fs_secret)
  end

Any help would be appreciated!

도움이 되었습니까?

해결책

you need to add the newest omniauth-foursquare version to your gemfile. The branch was just updated a few days ago with:

    @raw_info ||=     access_token.get('https://api.foursquare.com/v2/.    users/self?v=20140128').parsed['response'].   ['user']

Then everything should be working like a charm again.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top