Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upFix HTTP403 / "Missing or invalid url parameter" issue with Twitter API ... #232
Conversation
tomi-heiskanen
added some commits
Oct 2, 2013
This comment has been minimized.
This comment has been minimized.
|
There was an issue with merge, please see a424021 |
This comment has been minimized.
This comment has been minimized.
alokbanjare
replied
Oct 24, 2013
|
i have updated my libreary with the above changes to make image upload work but it is still not working I am pasting my code below, please let me know if there is any issue with my code $image = '@{http://www.example.com/assets/images/logo.jpg};type={image/jpeg};filename={Chrysanthemum.jpg}'; $parameters = array(
|
This comment has been minimized.
This comment has been minimized.
|
I had to make three commits, please check that your file is similar to this version: https://github.com/tomi-heiskanen/twitteroauth/blob/77795ff40e4ec914bab4604e7063fa70a27077d4/twitteroauth/twitteroauth.php It should work with no problems. What error do you get? |
This comment has been minimized.
This comment has been minimized.
|
Also, check if your tw_post-method calls the library's post-method with $multipart-parameter set true. |
This comment has been minimized.
This comment has been minimized.
alokbanjare
replied
Oct 24, 2013
|
Thanks! It's working now, It was not working beacuse I was using direct image urls like http://www.example.com/logo.jpg in the code, I replaced this with $_FILES object $image = "@{$_FILES['image']['tmp_name']};type={$_FILES['image']['type']};filename={$_FILES['image']['name']}" and now its working fine for me. But I wanted it to make it work with direct image urls without using $_FILES. Still playing with this, Thanks again |
This comment has been minimized.
This comment has been minimized.
pyranha
replied
Jan 7, 2014
|
Thanks for this! But I still can't figure it out (probably because I am a noob at this) this is the code I use: $connection = new TwitterOAuth($config_twitter_consumer_key, $config_twitter_consumer_secret, $access_token, $access_token_secret ); this is the image array: and I still get this response: what a'm i doing wrong?? thanks! gr, Ben |
abraham
added
the
Media
label
Aug 9, 2014
abraham
closed this
Jan 7, 2015
This comment has been minimized.
This comment has been minimized.
TerjeBr
commented
Oct 21, 2015
|
Why was this closed without merging? I am having the same issue now. |
This comment has been minimized.
This comment has been minimized.
|
This PR was closed because uploading media was added in a different PR. Make sure you are following the the instructions on https://twitteroauth.com/ for uploading media. If you are still having problems, open a new issue that what you are trying to do. |
tomi-heiskanen commentedOct 2, 2013
Fix HTTP403 / "Missing or invalid url parameter" issue with Twitter API 1.1 update_with_media-method. Content-Type must be "multipart/form-data" and as result signature must be calculated from oauth-header parameters only.