| Issue 795: | http response 200 for all status updates when hitting the update limits | |
| 2 people starred this issue and may be notified of changes. | Back to list |
I get 200 http responses for all the status updates I send, even though some of them I do not see at the page of the account I'm sending them for. Is this a bug or am I doing something wrong? I'm sending this URL using the cURL below: $url = "http://twitter.com/statuses/update.json?status=@tjaap+ISS+will+cross+the+sky+at+your+location+more+"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_VERBOSE, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:')); curl_setopt($ch, CURLOPT_USERPWD, "$username:$password"); curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); curl_setopt($ch, CURLOPT_POST, $method); curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (twisst.nl)"); $result["result"] = json_decode(curl_exec($ch), true); $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); ($method here is "POST") Here is the cUrl-info I got: ["info"]=> array(20) { ["url"]=> string(106) "http://twitter.com/statuses/update.json?status=@tjaap+ISS+will+cross+the+sky+at+your+location+more+details" ["content_type"]=> string(31) "application/json; charset=utf-8" ["http_code"]=> int(200) ["header_size"]=> int(921) ["request_size"]=> int(328) ["filetime"]=> int(-1) ["ssl_verify_result"]=> int(0) ["redirect_count"]=> int(0) ["total_time"]=> float(0.383) ["namelookup_time"]=> float(0.007) ["connect_time"]=> float(0.179) ["pretransfer_time"]=> float(0.179) ["size_upload"]=> float(0) ["size_download"]=> float(1303) ["speed_download"]=> float(3402.08877285) ["speed_upload"]=> float(0) ["download_content_length"]=> float(1303) ["upload_content_length"]=> float(-1) ["starttransfer_time"]=> float(0.383) ["redirect_time"]=> float(0) } } Thanks! |
|
,
Jul 06, 2009
BTW I now compare the follower id I was replying to against the 'in reply to id' in the status Twitter returned in response, to see if the message got through. This seems unreliable, but without a meaningfull http response, I don't know another way to check if the message made it. |
|
,
Jul 06, 2009
I have a feeling getting the http response like this
$httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
instead of doing something like this
$result["info"] = curl_getinfo($ch);
if ($result["info"]["http_code"] != 200) { etcetera
is more reliable (I just got a 502).
However, using my method of testing to see if posting a status update succeeded using
'in reply to id', I can now see lots of updates don't make it. Still, they come back 200.
Hope you can help!
|
|
,
Jul 06, 2009
You should be using CURL_POSTFIELDS for the status parameter (check out http://morethanseven.net/2007/01/20/posting-to-twitter-using-php/). One reason we'll return an HTTP 200 but not update your status is if it is a duplicate of the previous status. Can you tell me what account this is for? |
|
,
Jul 06, 2009
I can't make status updates using the account I set up for that, which is @twisstalert. When I switch to my other account, @twisst, I can. Maybe there is something wrong with my whitelisting? @twisstalert is not whitelisted itself, only the IP it is sending api calls from. I will change to CURL_POSTFIELDS now and post back if that helps. Thanks for your time! |
|
,
Jul 06, 2009
I have added CURL_POSTFIELDS, but I still can't send out status updates from @twisstalert, even though they still come back http 200. I don't think it is that I'm sending duplicate messages: every one has a different follower which it is replying to, with a unique url in it and often a different time mentioned: http://twitter.com/twisstalert Let me know if that is not enough variation for the system to consider them different. Thanks! |
|
,
Jul 06, 2009
Sending tweets from @twisst has stopped working now too. It seems like some limiting is still in place. My app sends out a lot of tweets, you see? I hope we can find out what's going on! |
|
,
Jul 06, 2009
There are update limits in place, and when you cross them you should start getting back and HTTP 403 rather than 200. I looked at @twisst and it has reached the update limit. As for @twisstalert I see an update 3 hours ago and your error report is 5 hours ago. Is the issue that the updates are not showing on http://twitter.com/twisstalert or that they are not showing up on search.twitter.com? |
|
,
Jul 06, 2009
The issue is that people won't receive the tweets from @twisstalert. It's not a problem if these messages don't show up in the search results. This is rather puzzling. According to rate_limit_status I should have 19500 api calls left. I thought being whitelisted meant I could make 20.000 api calls an hour. And is it not true that 'API methods that use HTTP POST to submit data to Twitter, such as statuses/update do not affect rate limits'? So could you please check whitelisting is in effect for @twisst and @twisstalert (the latter was not actually whitelisted itself, only its IP)? Thanks! |
|
,
Jul 06, 2009
Ah, rate_limit_status says @twisstalert *does* have a rate limit of 150 an hour. Its IP should be whitelisted though. Could you whitelist that one too? Please tell me if you want me to fill out the form for that one. Still it's odd that @twisst would encounter the same limit, right? And why the http responses are 200? You can see lots of people like getting those messages: http://search.twitter.com/search?q=%40twisst so thanks for looking into it! |
|
,
Jul 06, 2009
White listing does not affect POST calls like status update. They are governed by a method-specific limit which is not part of white listing. See: http://apiwiki.twitter.com/Things-Every-Developer-Should- Know#2Youcannotmakeunlimitedcallsfollowrequestsupdatesordirectmessage http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-statuses%C2%A0update http://help.twitter.com/forums/10711/entries/15364 Whitelisting will not fix an issue where you have reached the update limit. If you're seeing 19.500 you are definitely white listed because non-whitelisted requests will never see more than 150. The issue here seems to be update limits and not the normal API rate limit. |
|
,
Jul 06, 2009
Ok I was a bit confused about the difference between api limits and update limits, but I think I get it now. Thanks for explaining. The thing is, my app needs almost no GET calls, but a lot of POSTs, which is unordinary I suppose. I will send you an e-mail asking for an extraordinary treatment :-) And shouldn't those response codes be considered a bug? I have throttled down the status updates to 120 an hour, but still most of them are not appearing on http://twitter.com/twisstalert, despite the friendly 200 code I get. |
|
,
Jul 14, 2009
A little more context to this problem: http://groups.google.com/group/twitter-development-talk/browse_frm/thread/d57f84050fbb5c0d |
|
,
Jul 21, 2009
Accepted and assigned. Created internal ticket 7149 to track.
Summary: http response 200 for all status updates when hitting the update limits
Status: Accepted Owner: vernix |
|
,
Sep 09, 2009
(No comment was entered for this change.)
Status: Fixed
Owner: ra...@twitter.com |
|
,
Oct 14, 2009
Was this issue ever resolved and what was the problem. We are experiencing the same problem returning status 200 and the result just contains the content of the current latest tweet. The rate limit hasn't been reached yet. Also using php with curl and can't seem to understand what is causing this. |
|
|
|