twitter-async icon indicating copy to clipboard operation
twitter-async copied to clipboard

Adding support for posting a status with media

Open rinogo opened this issue 12 years ago • 3 comments

@RWAP added support for posting a status with attached media. However, his changes were based off of the 1.0 API. This pull request combines @RWAP's changes with @aaronwaldon's proposed 1.1 API pull request.

rinogo avatar Mar 01 '13 00:03 rinogo

In Twitter API 1.1 they recommend to use url api.twitter.com for media upload https://dev.twitter.com/docs/api/1.1/post/statuses/update_with_media

also after I switch the code to support 1.1 I get this error every time I try to upload media

{"errors":[{"message":"Status creation failed: The text of your tweet is too long.","code":190}]}

[code] $twitterObj->post('/statuses/update_with_media.json', array('@media[]' =>"@{$media};type=".$extension_mime_type[$extension].";filename={".$pathinfo['basename']."}", 'status' => $tweet));

[/code]

mrahmadt avatar Mar 18 '13 12:03 mrahmadt

I found the issues, just need to change EpiOAuth.php

https://github.com/jmathai/twitter-async/pull/148/files

mrahmadt avatar Mar 18 '13 13:03 mrahmadt

A simple merge of this caused some of the unit tests to fail. I assume it's got to do with the URL changes for 1.1.

I'll have a look later but if you want pull from upstream master and you should be able to reproduce.

jmathai avatar May 02 '13 23:05 jmathai