Open Graph & Rails not retrieving object's URL

Posted by Fred on Stack Overflow See other posts from Stack Overflow or by Fred
Published on 2012-07-07T15:10:06Z Indexed on 2012/07/07 15:15 UTC
Read the original article Hit count: 389

I'm using Rails to try and add an action for an object both defined for my app on the open graph. I am using an :after_filter in my controller to call the following after session#create:

@graph.put_connections('me', 'workkout:complete', :session => url_for([@plan, @session]))

I am getting the following back from Facebook:

{"error":{"type":"Exception","message":"Could not retrieve data from URL.","code":1660002}}

I have checked that the correct URL is passed to put_connections, and when I visit this URL using Facebook's Lint tool, everything is correct.

I can't understand why this isn't working, my only thought is that Facebook is hitting the URL moments before rails has generated the object? - not sure if that's even possible though.

Can anyone shed any light on this?

© Stack Overflow or respective owner

Related posts about facebook

Related posts about ruby-on-rails-3