Open electrototo11 opened 8 years ago
Same issue, any update ?
the 403 will be coming back from Twitter with some message explaining what the cause of the 403 was. if you inspect $tmhOAuth->response i can suggest possible causes and investigate further.
Thanks for the quick reply but I put my production back in PHP 5.5 and don't have an other environment to test it. Maybe @electrototo11 can inspect the response ?
Hi, The response is only : KO (403), no more... PHP version : 5.6.17
By the way, the problem only occurs (at least for me) when posting a tweet with a picture. Simple tweets (only text) was OK.
yes, same for me
we have this library working with php 5.6 for weeks now - no problem at all. as @themattharris pointed out, please have a look at the error message concerning your api call!
can you var_dump $tmhOAuth->response and share what it says
Hello, I had the same problem - after upgrade from php 5.5 to 7.0 tweets with picture stopped work with error 189 var_dump(json_decode($tmhOAuth->response['response'])) gives:
object(stdClass)#6 (1) { ["errors"]=> array(1) { [0]=> object(stdClass)#4 (2) { ["code"]=> int(189) ["message"]=> string(22) "Error creating status." } } }
To fix the problem I changed how attach image. I've changed this line
'media[]' => "@{$image};type=image/png;filename={$image}",
with
'media[]' => file_get_contents($image),
and now it's works. I don't know is this a change in twitter or PHP or somewhere else. Hope this will help someone.
I try now it's works ! Perfect ! thanks ik0.
Working fine, thanks @ik0 !
Hi, The program works with PHP5.5 but no longer works in 5.6, 403 error on my script :( How I can do ? Thanks