jublo / codebird-php

Easy access to the Twitter REST API, Direct Messages API, Account Activity API, TON (Object Nest) API and Twitter Ads API — all from one PHP library.
https://www.jublo.net/projects/codebird/php
GNU General Public License v3.0
777 stars 235 forks source link

Support for STATUS command on media/upload #190

Closed aironlio closed 7 years ago

aironlio commented 7 years ago

If the FINALIZE response includes "processing_info" field the Twitter doc said, 'STATUS' command is to be used to poll for the update until such time that 'state' is set to "succeeded" before we can move to next step which is usually create tweet.

The issue when using 'STATUS' command is that it requires an HTTP 'GET' method for the endpoint https://upload.twitter.com/1.1/media/upload.json and Codebird listed this API method as 'POST'.

I've been on instances when I was creating a tweet for a media that was successfully uploaded but the processing status is still pending, and as a result I ended up with an error. So it would be nice if there is a support for this.

Thank you for this great lib!

aironlio commented 7 years ago

Wow, I just realized that I was using an old version of the library. And this issue has been pointed out here: https://github.com/jublonet/codebird-php/issues/177