Skip to content
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

Support json payload body #347

Open
seppo0010 opened this issue Dec 9, 2020 · 0 comments
Open

Support json payload body #347

seppo0010 opened this issue Dec 9, 2020 · 0 comments

Comments

@seppo0010
Copy link

seppo0010 commented Dec 9, 2020

To add alt text to an image the request must be a json object:

https://developer.twitter.com/en/docs/twitter-api/v1/media/upload-media/api-reference/post-media-metadata-create

I think a small tweak in the __request method could do it, but I'm not sure

node-twitter/lib/twitter.js

Lines 136 to 143 in 296e82e

if (method === 'post') {
var formKey = 'form';
if (typeof params.media !== 'undefined') {
formKey = 'formData';
}
options[formKey] = params;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant