Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
koalapost
begin
@graph = Koala::Facebook::GraphAPI.new(user.fbaccess)
str = "hello fb world"
link = HOSTURL+"/comments/"+id #hostURL is an env variable for us
returnstr = @graph.put_wall_post(str,{:name=>"linkName",:link=>link})
rescue
#eventually we'll have more logic here, but we basically turn it off for now (no more posts if failure)
user.fbaccess = nil
user.fbusername = nil
user.fb_uid = nil
user.save!
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.