FourSquare:将新版本参数添加到Rails应用中的所有请求中



我正在使用deatise/omniauth-foursquare,并且最近遇到了困难,因为foursquare在每个请求中都请求版本参数。我在所有问题上都有这个错误:

foursquare ::错误(丢失了必需的参数或畸形的参数。如果路径中的资源ID不正确,也可以使用。):

我知道最近需要将V = 20131016参数添加到所有请求中,但我不确定如何添加。

我不确定。

我的设计配置看起来像这样:

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

我也这样访问foursquare:

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

任何帮助将不胜感激!

您需要将最新的Omniauth-Foursquare版本添加到您的Gemfile中。该分支几天前刚刚更新:

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

那么一切都应该像魅力一样工作。

最新更新