react-native-twitter icon indicating copy to clipboard operation
react-native-twitter copied to clipboard

Problems Uploading Images

Open Nikiforos86 opened this issue 7 years ago • 1 comments

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 avatar Jan 10 '18 18:01 Nikiforos86

@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

emachalan-redblox avatar May 08 '23 15:05 emachalan-redblox