05-30-2013 12:56 PM
Something like: postMedia("My Status", myFilename);
Solved! Go to Solution.
05-31-2013 03:45 PM
I have a sample app that uses Twitter, and jsOAuth to authenticate with Twitter. From that point you should be able to do and update_with_media. 99% of the OAuth work is just getting authorized with the service. After that, it's just a matter of POST/GET to your desired endpoint.
05-31-2013 09:06 PM
I've started trying to put it all together on my own, but it's like needing to reinvent the combusiton engine before buying a car, lol.
06-03-2013 09:00 AM
Ah right, sorry I forgot about that (very important) part.
Previously I've used PhoneGap's File Transfer API (when I wrote an app needing to upload to Twitter on BBOS). Right now, we have the WebWorks File Transfer API although it doesn't accept custom headers just yet.
Have you tried using XHR2, and creating your own request from scratch? I know you can get all the info you need from jsOauth as far as creating the signatures etc for the request, it may be just a matter of putting all the pieces together.
06-04-2013 04:01 PM
Hi again and thanks! Yup, I did try the new BB10 blackberry.io.fileTransfer call at one point just to see what it could do... and it crashes (closes) my app as soon as it's executed, lol. Never saw that happen before with a BB10 app, it didn't "hang," it just closed itself everytime the function was called. I'm guessing it still needs some work
It does look more and more like I'm going to have to do the transfer manually, as you suggest. It's just that I've read the nightmares others have had trying to do that with media uploads to Twitter, as it's apparently very picky about every little CR, etc. So I've been hoping someone else had figured it out and codified their findings in JS. I admit I'm waaay out of my realm of knowledge here when it comes to file transfers, formatting multi-part uploads, generating signatures, etc.
But I guess this is how/why we learn