我能够从网站获得响应,但无法路由到我的网页并收到路由错误
内部服务器错误
未初始化的常量ContactsLists 和 未初始化的常量ContactsListsController 要么 无法为InvitesController
找到操作'gmail'配置文件在
之下Rails.application.middleware.use OmniContacts::Builder do
importer :gmail, "client_id", "client_secret", {:redirect_path => "/contact_callback"}
end
谷歌控制台中的
重定向URI设置为 mylocaldomain.com/contact_callback
我希望将数据输出到我的contact_list控制器并邀请方法,以便在我定义的路线中
match "contact_callback" => '/contacts_lists/invitenew'
让我知道我做错了什么。
**编辑**
omnicontacts.rb
#check https://github.com/Diego81/omnicontacts for more info
Rails.application.middleware.use OmniContacts::Builder do
importer :gmail, "XXX", "****", {:redirect_path => "/contact_lists/gmail/contact_callback"}
importer :yahoo, "XXX", "****", {:callback_path => "/conta"215641561956751", "86245e1a6e7ce9b9e59cf440d5262e12",ct_lists/yahoo/contact_callback"}
importer :hotmail, "000000004011440B", "ah89ykZYvM1CcohvJhdcfEKaJL9Oktjt" , {:redirect_path => "/contact_lists/hotmail/contact_callback"}
importer :facebook, "XXX", "****", {:redirect_path => "/contact_lists/facebook/contact_callback"}
end
的routes.rb
get "/contact_lists/facebook/contact_callback" => "contact_lists#getfbinvite"
# get "/contact_lists/:provider/contact_callback" => "contact_lists#getinvite" #commented temp
get "/contact_lists/gmail/contact_callback" => "contact_lists#getinvite"
get "/contact_lists/yahoo/contact_callback" => "contact_lists#getinvite"
get "/contact_lists/hotmail/contact_callback" => "contact_lists#getinvite"
这将解决我的问题。现在我根据需要为所有网站提供所有差异功能。希望这会对你有所帮助。