Library: http://github.com/j7mbo/twitter-api-php
I’m saving a file locally and then trying to add it to a tweet. I can add tweets without images. I can display the images on my site ok.
If I send the headers through as
array(3) { [0]=> string(296) “Authorization: OAuth oauth_consumer_key=“blahblah”, oauth_nonce=“blahblah”, oauth_signature_method=“HMAC-SHA1”, oauth_token=“blahblah-blahblah”, oauth_timestamp=“1527001311”, oauth_version=“1.0”, oauth_signature=“blahblah%3D”” [1]=> string(7) “Expect:” [2]=> string(32) “Content-Type:multipart/form-data” }
I get a could not authenticate you error and 401
If I send the first two parts through I get a media type unrecognised error with 400
any ideas on what could be wrong?
FYI Another user mentioned that the file needs to be fully saved on the server so I’ve added a sleep command but that hasn’t helped.