jublo / codebird-php

Easy access to the Twitter REST API, Direct Messages API, Account Activity API, TON (Object Nest) API and Twitter Ads API — all from one PHP library.
https://www.jublo.net/projects/codebird/php
GNU General Public License v3.0
777 stars 235 forks source link

Fatal error: Uncaught Exception: Request error for API call: in .../codebird.php:1942 #213

Closed eQX8HNMTU2 closed 5 years ago

eQX8HNMTU2 commented 6 years ago


Fatal error: Uncaught Exception: Request error for API call: in /storage/ssd3/649/1242649/public_html/mangekyotweet/codebird.php:1942 Stack trace:

0 /storage/ssd3/649/1242649/public_html/mangekyotweet/codebird.php(1901): Codebird\Codebird->_callApiCurl('POST', 'statuses/update', 'statuses/update', 'status=Uchiha+C...', false, false)

1 /storage/ssd3/649/1242649/public_html/mangekyotweet/codebird.php(799): Codebird\Codebird->_callApi('POST', 'statuses/update', 'statuses/update', Array, false, false)

2 /storage/ssd3/649/1242649/public_html/mangekyotweet/index.php(18): Codebird\Codebird->__call('statuses_update', Array)

3 /storage/ssd3/649/1242649/public_html/mangekyotweet/index.php(21): tweet('Uchiha Clan', '../private/Stor...')

4 {main}

thrown in /storage/ssd3/649/1242649/public_html/mangekyotweet/codebird.php on line 1942

This is my code <?php

function tweet($message){

require_once ('codebird.php');

\Codebird\Codebird::setConsumerKey('3wNp1aVhNzvrQJkKjIYe8JnfR', 'U3EwIn7Mqm8m0PFVYgEOwEsnfOKjTQLJ0gOtKuBekxYNvFMTmx'); // static, see README

$cb = \Codebird\Codebird::getInstance();

$cb->setToken('835625795322277888-v0e5fyJ5UWOppfAW4vgY7SnqFi9N92Q', 'sFpwvBGBNUI5RquvkBm5wPsPA6fR0uyZMSN14ghAw3M6Q');

$params = array( 'status' => $message, 'media_ids' => "" ); //post the tweet with codebird $reply = $cb->statuses_update($params); } tweet("Uchiha Clan");


Please help me figure out what I am doing wrong. Thank you

mynetx commented 6 years ago

Please investigate whether your server can talk to the outside world (TCP 443) and whether the Twitter API is available.

mynetx commented 6 years ago

@AndiHamolli Any news on this?

mynetx commented 5 years ago

Closing this issue due to not having seen any further comments. Feel free to (re-) open a new one if you still encounter this problem.