-
Notifications
You must be signed in to change notification settings - Fork 299
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
Please add support for the new metadata endpoint #67
Comments
twurl 0.9.3 with modern (2.3.0) and legacy (1.9.3p551) ruby handles -A parameter correctly in my testing. Anyone else who can reproduce? This new endpoint is an important feature but it's also an odd duck implementation compared to other existing REST 1.1 ones. With 1.9.3p551:
With 2.3.0:
|
I see "User-Agent: OAuth gem v0.5.1" in both of your examples. Over here I get "User-Agent: OAuth gem v0.4.7". I just checked, and even the latest Ubuntu only has v0.4.7 of that package :/ |
Forced downgrade to match patch level and OAuth gem, same result. Can you share your command+output to see if anything stands out?
|
Here's what I got:
|
Hoh.. I think I've found the problem. I thought I had my twurl installation matched to the latest version, but turns out it was still v0.9.2. |
OK, I think this is because you're using twurl gem version 0.9.2 EDIT: jinx |
Yep, just tried tweeting, and there's alt text now \o/ |
Well, I guess that solves the issue. Might still want to consider adding something to not need the Content-Type: header, but at least things work for now. |
Using the media/metadata/create endpoint as described in https://dev.twitter.com/rest/reference/post/media/metadata/create requires adding a "Content-Type: application/json" header, but currently twurl (or the Ruby OAuth library it uses) overwrites this with "Content-Type: application/x-www-form-urlencoded", resulting in a "401 Authorization Required" and "32 Could not authenticate you." response from the API.
Minimal solution would be to not overwrite such a header, better would be to support JSON content for POSTs.
The text was updated successfully, but these errors were encountered: