目前,我目前正在使用考拉 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。