Twitter POST 403: Missing required parameter: status
I am trying to POST to Twitter's statuses/update endpoint: https://dev.twitter.com/rest/reference/post/statuses/update
I have constructed the request in JS according to the README:
const twitterUrl = 'https://api.twitter.com/1.1/statuses/update.json';
const response = await manager.makeRequest('twitter', twitterUrl, {
method: 'POST',
params: {
status: 'Maybe%20he%27ll%20finally%20find%20his%20keys',
},
});
But I am getting a 403 error: "Missing required parameter: status.". Seems like something funky is going on with the params key. Am I using it properly? Or is there a bug in the Objective C code that is making the request (https://github.com/fullstackreact/react-native-oauth/blob/master/ios/OAuthManager/OAuthManager.m#L416)? I don't know Objective C so I'm having trouble tracking this down, since everything looks right to me on the JavaScript side:

I am able to make a get request to twitter no problem, so it's not a configuration issue:
const response = await manager.makeRequest('twitter', 'https://api.twitter.com/1.1/statuses/user_timeline.json');
console.log(response); // Array of objects
The problem is somewhere embedded in the fact that the above is a POST request. I have tried passing in several sets of headers:
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
headers: { 'Content-Type': 'application/json' },
... but no luck. SOS! 😅
I was able to get around this by adding the status parameter directly on the url. IE:
https://api.twitter.com/1.1/statuses/update.json?status=hello
However, I am leaving this issue open because the params key of the request object are not working as expected.
I thinks it is not even supported, I have tried everything without luck. Why there is no official, reply on this?
This issue is still open since 2017. It seems to be twitter-related, so it can be closed here.