未定义的方法“set_facebook_session”尝试使用 Rails 和 Facebook Connect API 的 Facebooker 包装器时抛出异常

发布于 2024-08-23 10:27:17 字数 527 浏览 6 评论 0原文

我遵循了 此博客。当我尝试将浏览器指向“/login”时,出现以下异常,

undefined method `set_facebook_session' for #<SessionsController:0x15b0618>

我尝试在很多论坛中搜索,但找不到解决方案。即使我注释掉 set_facebook_session 的使用,我也会得到以下异常

undefined method `fb_login_button' for #<ActionView::Base:0x2d2c6ac>

这表明 Facebooker 库没有被包含在内。知道如何解决这个问题吗?

I followed all the steps given in this blog. When i am trying to point my browser to the "/login" I get the following exception

undefined method `set_facebook_session' for #<SessionsController:0x15b0618>

I tried searching in lot of forums but couldn't find the solution. Even if i comment out the use of set_facebook_session i get the following exception

undefined method `fb_login_button' for #<ActionView::Base:0x2d2c6ac>

This shows that the Facebooker library is not getting included. Any idea how to fix this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦冥 2024-08-30 10:27:17

Facebooker 现在可以作为 gem 使用,因此您不应该使用该插件。

gem install facebooker

然后在你的routes.rb文件中你需要包含facebooker gem:

config.gem "facebooker"

Facebooker is available as a gem now, so you shouldn't use the plugin.

gem install facebooker

Then in your routes.rb file you'll want to include the facebooker gem:

config.gem "facebooker"
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文