我正在尝试从rails应用程序建立连接,我正在使用自定义对象和我在Facebook开放图表仪表板(在开发人员区域中)中设置的自定义操作。
在我的应用程序控制器中,我有以下内容;
def graph
Koala::Facebook::API.new(cookies[:access_token]) unless cookies[:access_token].nil?
end
在我保存@submission记录后的创建方法中,我有以下内容;
graph.put_connections("me", "myappsnamespace:start", :submission => submission_path(@submission, :only_path => false))
每次进入上面的代码行我都会收到错误;
Koala::Facebook::APIError Exception: HTTP 500: Response body: {"error":{"message":"An unexpected error has occurred. Please retry your request later.","type":"OAuthException","code":2}}
如果我使用Open Graph Object调试器检查提交路径,则它不返回任何错误,并且所有相应的元属性标记都在那里。
Facebook的适当范围已在初始化程序中设置。
有什么想法吗?
答案 0 :(得分:0)
graph.put_connections的样本:
@graph.put_connections("me", "notes", :subject => "Finding my mom a gift: An Epic Odyssey", :message => all_the_details)
@graph.put_connections("me", "feed?message=foo%0D%0Abar")
但是"myappsnamespace:start"
是什么?