0

我正在开发小型 Web 应用程序,我想在其中实现 facebook 打开图形操作。所以我的代码看起来像

begin
      @auth_fb = user_token
      @app = ENV['FB_KEY']
      me = @auth_fb.token

      action = me.og_action!(
        "og_follows",
        :profile => 'http://samples.ogp.me/390580850990722'
      ) 

    rescue Exception => exc
   # logger.error "Failed to publish review #{review.id} to facebook #{user.facebook_auth}"
     logger.error "Facebook error msg: #{exc.message}"
end        

它给了我 Error Facebook error msg: undefined method `og_action!' for #如果我使用 curl 命令执行此操作,它工作正常。我正在使用 fb_graph (2.4.20) 并且还阅读了这个。有没有办法解决这个问题

需要帮助...谢谢...

4

1 回答 1

0

看看这个,你没有正确设置“我”。

https://github.com/nov/fb_graph/wiki/OpenGraph

于 2012-11-29T02:37:29.190 回答