Created
May 20, 2011 20:13
-
-
Save joesavak/983701 to your computer and use it in GitHub Desktop.
koalapost
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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