-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrectly Signing arrays of source parameters for photosets #24
Comments
Any idea when a fix for this is coming out? Unfortunately reverting to earlier versions of the gem didn't seem to fix the issue. |
Here is a working example (NOTE: I did try this back when this ticket was issued and it didn't work out, so I'm thinking something along the way was fixed in the meantime): If you use the # Load up creds (from wherever)
Tumblr.configure do |c|
YAML.load_file(File.expand_path('~/.tumblr')).each do |k, v|
c.send("#{k.to_sym}=", v)
end
end
# Make a blog post with two photos
path1 = '<path as string>'
path2 = '<path as string>'
puts Tumblr.new.photo 'apeyes.tumblr.com', data: [path1, path2] # success And if you use # Load up creds
creds = {}.tap do |h|
YAML.load_file(File.expand_path('~/.tumblr')).each do |k, v|
h[k.to_sym] = v
end
end
client = Tumblr::Client.new(creds)
# Make a blog post with two photos
path1 = '<path as string>'
path2 = '<path as string>'
puts client.photo 'apeyes.tumblr.com', data: [path1, path2] |
Nope, this only works with local files, not with URLs like it used to from my testing. Give this a go for instance: cl = Tumblr.new
images = ["http://www.saawinternational.org/whale.jpg"]
cl.photo('funtesting.tumblr.com', {source: images})
>>{"status"=>401, "msg"=>"Not Authorized"} I get a success when posting text or an image from a file locally. |
Thanks for the code - will check this out tomorrow morning |
@seejohnrun did we fix this ticket? Looks like we might have :) |
@codingjester woah this is a blast from the past. I'm not longer with #contently who was using the gem heavily but you might want to check in with @sanjayginde or @kcurtin on this who are still on the team! |
I just updated to 0.8.3 still getting
|
Awesome for confirming it's still broken @persocon Would you be able to throw me some code on exactly how you're sending your photos? I was able to send photos without a problem using the :data parameter. |
Sure
like this :) the result is a array of image paths |
It seems when migrating to using the built in Faraday OAuth functionality, the way we sign source arrays was broken. It seems that SimpleOAuth is double encoding the source arrays and we'll need to either mitigate this or patch it upstream.
The text was updated successfully, but these errors were encountered: