You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 4, 2018. It is now read-only.
I'm running a loop over more than 10,000 users were I set oauth with their twitter account (already authorised) and post a status to the twitter account
I'm facing a random error with different users (not sure till now if this is linked to the user accounts) that the function $twitterObj->post_statusesUpdate with throw exception but no error message with it!
Im using API 1.1 (not sure if the same case with version 1)
I did small check by changing the below code in EpiTwitter.php
no, this is the issues, it doesn't return any thing
one thing I did just now is to change class EpiTwitterException to add the following
class EpiTwitterException extends Exception
{
public static function raise($response, $debug)
{
$TMPTMP = array($response->code,$response->data); @mail('[email protected]', 'EpiTwitter', print_r($TMPTMP,true));
$message = $response->data;
switch($response->code)
{
case 400:
throw new EpiTwitterBadRequestException($message, $response->code);
case 401:
throw new EpiTwitterNotAuthorizedException($message, $response->code);
case 403:
throw new EpiTwitterForbiddenException($message, $response->code);
case 404:
throw new EpiTwitterNotFoundException($message, $response->code);
case 406:
throw new EpiTwitterNotAcceptableException($message, $response->code);
case 420:
throw new EpiTwitterEnhanceYourCalmException($message, $response->code);
case 500:
throw new EpiTwitterInternalServerException($message, $response->code);
case 502:
throw new EpiTwitterBadGatewayException($message, $response->code);
case 503:
throw new EpiTwitterServiceUnavailableException($message, $response->code);
default:
throw new EpiTwitterException($message, $response->code);
}
}
}
and it seems to be working fine, I can get the json code by email
also when I do print_r($e), it seems to me that the unset is not working and I can see the object $twitterObj keeps growing with all previous post that I did for other users in the loop (PHP bug?)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello
I'm running a loop over more than 10,000 users were I set oauth with their twitter account (already authorised) and post a status to the twitter account
I'm facing a random error with different users (not sure till now if this is linked to the user accounts) that the function $twitterObj->post_statusesUpdate with throw exception but no error message with it!
Im using API 1.1 (not sure if the same case with version 1)
I did small check by changing the below code in EpiTwitter.php
To
and now I got this message in my email
Array
(
[0] => response
[1] => Array
(
[responseText] => 1
[headers] => 1
[code] => 1
)
)
so it seems the error I'm getting from Twitter is "{"errors":[{"code":187,"message":"Status is a duplicate"}]}"
but I'm not sure why I don't get it in the exception error message.
what do you think?
Thanks
The text was updated successfully, but these errors were encountered: