Ruby on rails FourSquare:向rails应用程序中的所有请求添加新版本参数
我正在使用Desive/omniauth foursquare,最近遇到了一些困难,因为foursquare在每个请求中都请求版本参数。我在每件事上都会遇到这样的错误: Foursquare::Error(缺少必需的参数或参数格式不正确。如果路径中的资源ID不正确,也会使用此选项): 我知道在最近的foursquare更新中,我需要将v=20131016参数添加到所有请求中,但我不确定如何添加它 我的设计配置如下所示:Ruby on rails FourSquare:向rails应用程序中的所有请求添加新版本参数,ruby-on-rails,devise,version,omniauth,foursquare,Ruby On Rails,Devise,Version,Omniauth,Foursquare,我正在使用Desive/omniauth foursquare,最近遇到了一些困难,因为foursquare在每个请求中都请求版本参数。我在每件事上都会遇到这样的错误: Foursquare::Error(缺少必需的参数或参数格式不正确。如果路径中的资源ID不正确,也会使用此选项): 我知道在最近的foursquare更新中,我需要将v=20131016参数添加到所有请求中,但我不确定如何添加它 我的设计配置如下所示: require 'omniauth-foursquare' config.o
require 'omniauth-foursquare'
config.omniauth :foursquare, "[MY_APP_ID]", "[MY_SECRET_ID]"
def foursquare
@foursquare ||= Foursquare::Base.new(fs_app_id, fs_secret)
end
我也可以这样访问foursquare:
require 'omniauth-foursquare'
config.omniauth :foursquare, "[MY_APP_ID]", "[MY_SECRET_ID]"
def foursquare
@foursquare ||= Foursquare::Base.new(fs_app_id, fs_secret)
end
任何帮助都将不胜感激 您需要将最新的omniauth foursquare版本添加到您的文件中。该分支机构几天前刚刚更新为:
@raw_info ||= access_token.get('https://api.foursquare.com/v2/. users/self?v=20140128').parsed['response']. ['user']
然后,一切都应该像一个魔咒一样工作。谢谢尼古拉,我还必须指定参数:
@foursquare | |=foursquare::Base.new(:client_id=>fs_app_id,:client_secret=>fs_secret)