I need to be able to update a twitter status using only functions allowed by Wordpress VIP.
I am using this library: https://github.com/Automattic/wp-codebird
Which of course is broken, any of the functions that upload an image just don't work. I already posted an issue https://github.com/Automattic/wp-codebird/issues/6
But the project is dead, I doubt any updates will ever hit it again, so I need to fix this issue myself using this old code I am forced to work with.
Basically I think I can easily fix this issue if I know what variables I need to feed wp_remote_post to update_with_media. Here is what I am currently feeding in and the responses I am receiving.
// url I am requesting $url = 'https://api.twitter.com/1.1/statuses/update_with_media.json'; // the 2nd argument to wp_remote_post $params = Array ( [method] => POST [timeout] => 5 [redirection] => 5 [httpversion] => 1.1 [blocking] => 1 [headers] => Array ( [Authorization] => OAuth oauth_consumer_key="[MY CONSUMER KEY]", oauth_nonce="8429c5ec", oauth_signature="V3vGmKCYCp2yDjCFl5OTKzEfVlc%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1385072895", oauth_token="[MY TOKEN]", oauth_version="1.0" [Expect] => [Content-Type] => multipart/form-data ) [body] => Array ( [status] => Testing http://127.0.0.1:7070/?p=57 [media] => @/home/dillon/Code/lib/WordPress/wp-content/uploads/2013/11/Selection_001.png ) [cookies] => Array ( ) [sslverify] => ); // this is the object returned to me $response = Array ( [errors] => Array (  => stdClass Object ( [code] => 195 [message] => Missing or invalid url parameter. ) ) [httpstatus] => 403 ); // this is what is returned to me if I remove the Content-Type from the header array $response = Array ( [errors] => Array (  => stdClass Object ( [message] => Could not authenticate you [code] => 32 ) ) [httpstatus] => 403 );