【发布时间】:2012-05-08 01:20:34
【问题描述】:
目前,我正在使用 Koala 1.4.0 做开放图。
我确实创建了一个 动作类型:查看 对象类型:广告
我目前希望归档的是: 当点击页面上的查看按钮时,在 facebook 代码上,它会显示,用户正在查看广告。
我得到的错误:
HTTP 500: Response body: {"error":{"type":"Exception","message":"The action you're trying to publish is invalid because it does not specify any reference objects. At least one of the following properties must be specified: advertisement."}}
我是如何做到的:
graph = Koala::Facebook::API.new(@user.token)
graph.put_connections("#{@user.uid}", "namespace:View" , :object=>"#{url_for(@advertisement)}"
它在我的显示控制器中。在我的 show.html.erb 中,我确实包含了所有元数据。我也使用 koala 分享到 Facebook 功能,它运行良好,成功地从我的页面获取元数据并将其发布到 Facebook。
使用导轨 3.0.9。
【问题讨论】:
标签: ruby-on-rails facebook facebook-opengraph koala