Created
May 7, 2010 01:18
-
-
Save nov/392901 to your computer and use it in GitHub Desktop.
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
require 'rubygems' | |
require 'fb_graph' | |
ACCESS_TOKEN = "..." | |
begin | |
me = FbGraph::User.me(ACCESS_TOKEN) | |
album = me.albums.first | |
photo = album.photo!( | |
:access_token => ACCESS_TOKEN, | |
:image => File.new(File.join(File.dirname(__FILE__), 'nov.gif')), | |
:message => 'Hello, where is photo?' | |
) | |
puts photo.inspect | |
rescue => e | |
puts e.body | |
end |
Umm, this error message isn't helpful :(
As you mentioned, rest-client gem seems had an issue.
http://github.com/archiloque/rest-client/issues/issue/17
Can you try to install newest rest-client master branch?
It might solve your problem.
http://gist.github.com/393345
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's the results...
Pirate Stuff
{"error":{"type":"Exception","message":"(#1) An unknown error occurred"}}
The first line is the name of the album that I'm trying to load the photo into, to make sure the first calls were succeeding.
I'm afraid the error message is not very helpful. I traced through the code earlier, and it was getting a 500 error from the facebook server. I'm on a windows machine. I've tried uploading directly with RestClient with no luck either. I'm starting to suspect a RestClient / Windows issue.