react-native-twitter
react-native-twitter copied to clipboard
Problems Uploading Images
Hello, i am trying to upload an image to Twitter using your library. i did read your solution here but it does not work. Having some more read into your code i understand that only the old method from here is supported and not the new one, but even so i could not upload an image.
I tried to implement the chunked method on my own, and started by doing something like
client.rest.post('media/upload', {command:"INIT", total_bytes:"70456", media_type:"image/jpeg"}).then((resolve) => { alert('media/upload '+ JSON.stringify(resolve)) console.log('done'); }).catch(console.error);
but nothing is returned. Still, if i use an alert after response.text() on raw.js of the included libraries i do get the response.
I am fairly new to React-Native (and JS) so, could ypu please provide a better example, or a way to actually retrieve the response there and chain it with the APPEND and FINISH methods?
Thanks in advance
@Nikiforos86 Am also trying to upload video/image, but it still showing error like => media parameter is missing. Anyone please help me to overcome this issue