[twitter-dev] Re: Automated Tweets

2009-10-29 Thread Damon Clinkscales

Exact dupes sent via the API are dropped.  I believe that it's
intended to prevent runaway apps from posting the same thing over and
over (say if an app had a bug...nevar!).  This feature actually saved
my bacon once.

It's not new, though.  It's been that way for at least 18 months.

-damon
-- 
http://twitter.com/damon

On Wed, Oct 28, 2009 at 6:27 AM, ryan alford ryanalford...@gmail.com wrote:

 Twitter recently implemented logic to stop the ability of duplicate
 tweets. I can't remember if it was ever released what the time period
 is.

 On Oct 28, 2009, at 7:24 AM, Greg gregory.av...@gmail.com wrote:


 Hello,

 I have an application that sends out a Tweet when a user Authorizes
 the Application and asks a Question to a particular user. Does Twitter
 block continous sending out of a Tweet within a time period? I am
 doing testing of the application and whenever I try to do a Update
 Status - it returns the ID of the last Tweet that I made from the
 account. Did my Consumer Key/Consumer Key get blocked, or will Twitter
 not allow the same tweet to be posted in a certain time period?

 Greg


[twitter-dev] Re: Automated Tweets

2009-10-29 Thread Dave Sherohman

On Thu, Oct 29, 2009 at 12:48:02PM +0700, Dwi Sasongko Supriyadi wrote:
 On Wed, Oct 28, 2009 at 9:40 PM, Jai jaishank...@gmail.com wrote:
  What is the criteria for dupliate tweets? then how the polling
  applications works? they may have several tweets with similar text?
 
 Duplicate tweets = consecutively, exactly same tweet.
 
 tweet1 = foo;
 tweet2 = bar;
 
 rv1 = send_tweet(tweet1);
 rv2 = send_tweet(tweet1);
 rv3 = send_tweet(tweet2);
 
 above sequence, only rv1 and rv3 are succeed.

That is not the full definition, or at least it wasn't around two weeks
ago when I first noticed it.  Once tweet1 has been sent, any attempt
to send tweet1 again within the next hour (probably longer, but I have
not attempted to determine the upper bound) will fail, regardless of how
many additional updates have been sent during that time.

rv1 = send_tweet(tweet1); # OK
rv2 = send_tweet(tweet2); # OK
...
rv100 = send_tweet(tweet100); # OK
rv101 = send_tweet(tweet1); # Fails, if within some unknown time limit

-- 
Dave Sherohman


[twitter-dev] update_delivery_device method

2009-10-29 Thread DustyReagan

I was playing around with the account/update_delivery_device method.

It seems to behave like this:

device=sms:im - Does nothing
device=none - Turns device updates off

Neither sms or im turn device updates back on.

Are there any plans for this method to be updated or deprecated?


[twitter-dev] Re: Search API - 403 bursts and (maybe) a caching issue.

2009-10-29 Thread janole

I'm experiencing the same. Empty results from the Search API when
using the since_id parameter.

This is really bad and my users are complaining about the Saved
Searches tabs not updating.

If you're lucky you end up at a caching server with up-to-date
information, but it seems as if you can't force using that caching
server.

Please let us know if this can be fixed easily.

Ole / Gravity Twitter Client for S60/Symbian

s...@mobileways.de / @janole on Twitter

On 26 Okt., 20:47, briantroy brian.cosin...@gmail.com wrote:
 Everything below ONLY PERTAINS TO THESEARCHAPI:

 1) Since late last week I've noticed a significant number of 403
 errors (403 Error from JSON: since_id too recent, poll less
 frequently). These usually indicate I'm hitting a server with an
 older view of thesearchindex - since it thinks the ID I sent in
 since_id is newer than the newest it has. These trouble me because
 when I get a 200 after the 403 sometimes I get everything back to my
 since_id, sometimes I don't. I appears some indexes have gaps until
 they catch up.

 QUESTION: Are there any ongoingsearchindexing issues that you are
 aware of?

 2) Since late last week I've noticed that somesearchAPI requests
 appear to get stuck returning an empty json result (no new tweets).
 This can go on for HOURS (today one got stuck like this for 12 hours).
 When I restart my process sometimes this clears up (I get the backlog)
 - other times it does not (I continue to get 0 tweets in the json).
 All of the requests return HTTP 200 and valid json.

 QUESTION: Are they any ongoing caching issues with thesearchAPI?

 These issues are new in the last 7 days (since about last Thursday).
 My IP is whitelisted. I'm sending both a valid user agent and referrer
 header. My processes are throttled by the volume of tweets the
 receive. I've made no changes to my processing since late September.

 Any assistance would be appreciated. My user's are comparing what they
 see from my service tosearch.twitter.com and telling me we are
 broken.

 Regards,

 Brian Roy
 justSignal


[twitter-dev] Re: Automated Tweets

2009-10-29 Thread Jelle De Laender

So it only look at the previous tweet from that user? Or the previous  
tweet send by your application (via the API) for that user?
So for example: If you have 2 static messages A and B, and your app  
posts tweet A, B, A, B, A, B, ... it shouldn't be a problem?

My webapp can tweet 2 static tweets (per user) when an event occurred.  
Something like an alert/notification system that can optional tweet a  
message for the followers.
I noticed that my tweets aren't post successfully (I'm speaking about  
2-3 tweets per month per user, so no high number).
I found this thread and I read that you can't post duplicated tweets,  
quite stupid since my users can enter a custom message, so this  
message will be static.

At the moment, as temporally fix, I add a random and unique string to  
the end of the tweet, just to be strange my tweet will be post  
successfully, but this isn't nice...

Jelle

On 29 Oct 2009, at 06:01, Chad Etzel wrote:


 Hello,

 Currently we discard a tweet if it is an exact duplicate of the
 previous tweet, however we still return a success code (200). We are
 planning on changing this so it will return an error code when a tweet
 is not posted.

 -Chad

 On Wed, Oct 28, 2009 at 10:40 AM, Jai jaishank...@gmail.com wrote:

 What is the criteria for dupliate tweets? then how the polling
 applications works? they may have several tweets with similar text?

 On Oct 28, 8:14 am, Dwi Sasongko Supriyadi ruck...@gmail.com wrote:
 Hello,

 On Wed, Oct 28, 2009 at 6:23 PM, Greg gregory.av...@gmail.com  
 wrote:

 Hello,

 I have an application that sends out a Tweet when a user Authorizes
 the Application and asks a Question to a particular user. Does  
 Twitter
 block continous sending out of a Tweet within a time period? I am
 doing testing of the application and whenever I try to do a Update
 Status - it returns the ID of the last Tweet that I made from the
 account. Did my Consumer Key/Consumer Key get blocked, or will  
 Twitter
 not allow the same tweet to be posted in a certain time period?

 I also develop an application that sends tweets taken from  
 plaintext.  So
 far, I found experiences that twitter doesn't allow consecutive  
 tweets that
 are identical.

 DWI




[twitter-dev] Re: Profile search based on Bio field

2009-10-29 Thread Jim Gilliam
Topsy provides an API for searching user bios.

http://code.google.com/p/otterapi/wiki/Resources#/profilesearch

On Wed, Oct 28, 2009 at 2:38 PM, MuratMetu muratm...@yahoo.com wrote:


 Hello, we are new to twitter development, we want to know is there any
 open source API that provides us to send String query (regular
 expression) and return the list of the users whose bio text match with
 the query in their profile. Thank you.



[twitter-dev] More permission-levels for applications

2009-10-29 Thread Wouter van Vliet

Hi Y'all,

(if this discussion has already been covered, please refer me to the
proper post - did a search, but couldn't find it)

At this moment, there are just two levels of access an application can
acquire for an account. Read and/or Write. And it's all controlled by
the application builder. While this is really easy, I - as application
builder - actually feel that I'm getting way too much power over each
user's Twitter account once they have connected their Twitter to their
local account.

Are there any plans, and if so, what is the schedule, to change this
into more categories. When registering an application, I could imagine
that I would have to select what kind of access the application
requires. A few examples:

Most limited:Receive username and public timeline information
More extended: Read all account information (including email
address)

Several catagories of write-access:
 - Post to timeline
 - Update profile
 - Update image
 - Create/delete friendships (possibly even limited to creating one
follower, being the owner of the application)
 - Full

Especially websites which want to - mainly - offer sign-in through
Twitter, would absolutely have enough access - if they could just read
a bit of account info and post updates to the timeline, following
specific user actions on the site (post a comment, post an article,..
etc).

Additionally, I'd like to see a bit more power to the user. Since we
(@ilikealot) would like to be able to post an update to the timeline
when our users post new content (likealots), I checked the Read
write option. But any user who don't want their likealot to show up
on Twitter should still be able to login, and feel comfortable that
we're not ABLE to post any updates. This would extend the approval-box
on the user-end with the option: Don't allow [application] to update
my status [, or account information].

Regards,

Wouter van Vliet
http://www.ilikealot.com/


[twitter-dev] API call accounting by account rather than IP for non-authenticated requests

2009-10-29 Thread Terry Jones

I just submitted a whitelisting request, along with a comment along the
following lines:

I think it would be good if Twitter did API call accounting based on the
HTTP auth header whenever one is sent - even if the call itself does not
require auth.

I'm at home right now and although my account (@terrycojones) is
whitelisted, my home IP is not. So while I can make a decent number of
authenticated calls, I can't do much with the app I'm trying to write as
it's making non-authenticated calls. The non-authenticated calls are
accounted for by IP. Even if my home IP were whitelisted, I'd be stuck if I
were in a hotel.

The concrete suggestion is: to always do API call accounting based on the
passed auth details, and if no auth information is passed, then fall back
to IP-based accounting.

That wouldn't change much and is backwards compatible. Auth requiring calls
would be just as they were. But in the case of non-auth requiring calls,
the developer would have the choice: send auth to get account based
accounting, don't send it to get IP based accounting.

Terry


[twitter-dev] Any response from Twitter?

2009-10-29 Thread orian

Can someone from the API team please comment on this?


[twitter-dev] Re: Making crossdomain.xml less restrictive on api.twitter.com?

2009-10-29 Thread orian

Can someone from the API team please comment on this?

On Oct 21, 1:31 pm, orian orianm...@gmail.com wrote:
 Now that api.twitter.com has gone live, can we please have a less
 restrictive crossdomain.xml so that Flash apps can access the API
 without requiring the use of a proxy? This was being planned more than
 a year and a half 
 ago:http://groups.google.com/group/twitter-development-talk/browse_thread...


[twitter-dev] Re: Any response from Twitter?

2009-10-29 Thread JDG
comment on WHAT?

On Thu, Oct 29, 2009 at 09:33, orian or...@orianmarx.com wrote:


 Can someone from the API team please comment on this?




-- 
Internets. Serious business.


[twitter-dev] Re: Any response from Twitter?

2009-10-29 Thread orian

Ugh sorry that was supposed to be a response to this thread:
http://groups.google.com/group/twitter-development-talk/browse_frm/thread/e35a708400b529b3

On Oct 29, 11:33 am, orian or...@orianmarx.com wrote:
 Can someone from the API team please comment on this?


[twitter-dev] Re: Making crossdomain.xml less restrictive on api.twitter.com?

2009-10-29 Thread Chad Etzel

Hello,

After discussing this internally, we have decided that we will make
the crossdomain.xml policy more open on the api.twitter.com domain. We
don't know exactly what that entails yet or when it will go into
effect, but this is something that we want to open up.

Expect another post when we've reached a final conclusion.

-Chad

On Thu, Oct 29, 2009 at 11:34 AM, orian or...@orianmarx.com wrote:

 Can someone from the API team please comment on this?

 On Oct 21, 1:31 pm, orian orianm...@gmail.com wrote:
 Now that api.twitter.com has gone live, can we please have a less
 restrictive crossdomain.xml so that Flash apps can access the API
 without requiring the use of a proxy? This was being planned more than
 a year and a half 
 ago:http://groups.google.com/group/twitter-development-talk/browse_thread...



[twitter-dev] Twitter connection giving a 502 Bad Gateway error

2009-10-29 Thread hima

Hi
I am trying to collect users data from twitter, like the number of
followers, number of tweets, the time the user' account is alive and
similar statistics. I have done this before in august and got
appropriate results with my code.I ran the code again a week ago and
it worked and gave me results. The same code however, stopped working
since a week now responding with a 502 bad gateway error. I am not
able to connect to the twitter page and get the xml body. This is my
function to return the xml page:

public static String webget(String host, String doc, String username,
String password)
{
String body = ;
byte[] auth = Base64.decode(username + : + password );
String header = Get  + doc +  HTTP/1.0\r\n;
header += Authorization: Basic  + auth ;
header += Accept: application/xml, text/plain, text/xml, 
text/*\r
\n;
header += \r\n;

try
{
Socket sock = new Socket(host, 80);
OutputStreamWriter os = new 
OutputStreamWriter(sock.getOutputStream
());
os.write(header);
os.flush();
sock.getOutputStream().flush();

BufferedReader br = new BufferedReader(new
InputStreamReader(sock.getInputStream()));
String str = null;
while ( (str = br.readLine()) != null)
{
body += str + \n;
}
sock.close();
}
catch(IOException ioe)
{
return ;
}

return body;
}


This function is called like this:

webget(twitter.com, /users/show/+UserId+.xml, USERNAME,
PASSWORD)


I have not made any changes to the code since august. I am guessing
there have been changes in the twitter API which is giving me this
error.However, nothing like this is mentioned in the forums. Can you
let me know if there are changes in the twitter API that is causing
this?

Thanks
Hima


[twitter-dev] JavaScript error

2009-10-29 Thread voorwiel

FYI, viewing any profile page on twitter.com throws a JavaScript error
in IE8 : 'undefined' is empty or no object, twitter.js, line 1, URI:
http://a3.twimg.com/a/1256778767/javascripts/twitter.js?1256779295

Sorry for posting this in the API development group, but I see no
other way to file a bug report. Correct me if I'm wrong.



[twitter-dev] Re: Net::Twitter dev release with Lists API support

2009-10-29 Thread Marc Mims

* Scott Elcomb pse...@gmail.com [091028 21:37]:
 On Sat, Oct 24, 2009 at 12:47 AM, Marc Mims marc.m...@gmail.com wrote:
  In my own testing, I've noticed that the update_list call always returns
  a 500 status, even though it succeeds.  That's probably a Twitter bug
  that will be worked out.
 
 I'm seeing the same behaviour here.  However when calling
 $nt-delete_list($user, $slug) on my test list, the list remains and I
 get the response:
 
   unexpected HTTP method: DELETE at
 [path-to]/perl/5.10.0/Net/Twitter/Role/API/Lists.pm line 119

Did you install the full developer release, or just the
Net::Twitter::Role::API::Lists module?  Are you using Basic or OAuth
authentication?

Changes were made to both Net::Twitter::Core and
Net::Twitter::Role::OAuth to support the DELETE method.  Either you
don't have those updated modules or I have a bug in one (or both) of
them.

I've tested it on my own account with both Basic and OAuth and
delete_list is successful, so if you've got the correct Core and OAuth
modules perhaps a stack trace would shed some light.

-Marc


[twitter-dev] Re: Twitter connection giving a 502 Bad Gateway error

2009-10-29 Thread Naveen Ayyagari


I have seen these in our users logs as well. I wasn't sure if it was  
twitter or a mobile gateway they were using.


On Oct 29, 2009, at 11:41 AM, hima wrote:



Hi
I am trying to collect users data from twitter, like the number of
followers, number of tweets, the time the user' account is alive and
similar statistics. I have done this before in august and got
appropriate results with my code.I ran the code again a week ago and
it worked and gave me results. The same code however, stopped working
since a week now responding with a 502 bad gateway error. I am not
able to connect to the twitter page and get the xml body. This is my
function to return the xml page:

public static String webget(String host, String doc, String username,
String password)
{
String body = ;
byte[] auth = Base64.decode(username + : + password );
String header = Get  + doc +  HTTP/1.0\r\n;
header += Authorization: Basic  + auth ;
header += Accept: application/xml, text/plain, text/xml, 
text/*\r
\n;
header += \r\n;

try
{
Socket sock = new Socket(host, 80);
OutputStreamWriter os = new 
OutputStreamWriter(sock.getOutputStream
());
os.write(header);
os.flush();
sock.getOutputStream().flush();

BufferedReader br = new BufferedReader(new
   InputStreamReader(sock.getInputStream()));
String str = null;
while ( (str = br.readLine()) != null)
{
body += str + \n;
}
sock.close();
}
catch(IOException ioe)
{
return ;
}

return body;
}


This function is called like this:

webget(twitter.com, /users/show/+UserId+.xml, USERNAME,
PASSWORD)


I have not made any changes to the code since august. I am guessing
there have been changes in the twitter API which is giving me this
error.However, nothing like this is mentioned in the forums. Can you
let me know if there are changes in the twitter API that is causing
this?

Thanks
Hima




[twitter-dev] Re: Net::Twitter dev release with Lists API support

2009-10-29 Thread Scott Elcomb

On Thu, Oct 29, 2009 at 1:09 PM, Marc Mims marc.m...@gmail.com wrote:
 Did you install the full developer release, or just the
 Net::Twitter::Role::API::Lists module?  Are you using Basic or OAuth
 authentication?

 Changes were made to both Net::Twitter::Core and
 Net::Twitter::Role::OAuth to support the DELETE method.  Either you
 don't have those updated modules or I have a bug in one (or both) of
 them.

 I've tested it on my own account with both Basic and OAuth and
 delete_list is successful, so if you've got the correct Core and OAuth
 modules perhaps a stack trace would shed some light.

Last night I'd only added the Lists.pm module; after grabbing and
installing the complete package just now, the error has gone away.

Though it is on my radar, I haven't done any development with OAuth yet.

I'll try to get some more thorough testing done tonight.  Thanks for your help.

-- 
  Scott Elcomb
  http://www.psema4.com/   @psema4

  Member of the Pirate Party of Canada
  http://www.pirateparty.ca/


[twitter-dev] Re: Twitter connection giving a 502 Bad Gateway error

2009-10-29 Thread Adam Green

I'm also getting intermittent 502 errors, so I don't think this is
code specific. I am calling the search API and getting a 502 error
every couple of hours. The vast majority of API calls are working.
Repeating the call after a 502 error generally works.

On Oct 29, 11:41 am, hima himaca...@gmail.com wrote:
 Hi
 I am trying to collect users data from twitter, like the number of
 followers, number of tweets, the time the user' account is alive and
 similar statistics. I have done this before in august and got
 appropriate results with my code.I ran the code again a week ago and
 it worked and gave me results. The same code however, stopped working
 since a week now responding with a 502 bad gateway error. I am not
 able to connect to the twitter page and get the xml body. This is my
 function to return the xml page:

 public static String webget(String host, String doc, String username,
 String password)
         {
                 String body = ;
                 byte[] auth = Base64.decode(username + : + password );
                 String header = Get  + doc +  HTTP/1.0\r\n;
                 header += Authorization: Basic  + auth ;
                 header += Accept: application/xml, text/plain, text/xml, 
 text/*\r
 \n;
                 header += \r\n;

                 try
                 {
                         Socket sock = new Socket(host, 80);
                         OutputStreamWriter os = new 
 OutputStreamWriter(sock.getOutputStream
 ());
                         os.write(header);
                         os.flush();
                         sock.getOutputStream().flush();

                         BufferedReader br = new BufferedReader(new
                         InputStreamReader(sock.getInputStream()));
                         String str = null;
                         while ( (str = br.readLine()) != null)
                         {
                                 body += str + \n;
                         }
                         sock.close();
                 }
                 catch(IOException ioe)
                 {
                         return ;
                 }

                 return body;
         }

 This function is called like this:

 webget(twitter.com, /users/show/+UserId+.xml, USERNAME,
 PASSWORD)

 I have not made any changes to the code since august. I am guessing
 there have been changes in the twitter API which is giving me this
 error.However, nothing like this is mentioned in the forums. Can you
 let me know if there are changes in the twitter API that is causing
 this?

 Thanks
 Hima


[twitter-dev] Re: Twitter connection giving a 502 Bad Gateway error

2009-10-29 Thread Dave Briccetti

I’ve learned that wrapping every Twitter Web service call with retry
logic is essential.

http://github.com/dcbriccetti/talking-puffin/blob/master/twitter-api/src/main/scala/org/talkingpuffin/twitter/Http.scala
http://github.com/dcbriccetti/talking-puffin/blob/master/twitter-api/src/main/scala/org/talkingpuffin/twitter/HttpRunner.scala


[twitter-dev] 503 with gigantic retry-after value

2009-10-29 Thread Benjamin Darfler

We are using the search api and respecting the 503 and retry-after
values however I've seen a retry value in the 40 YEARS range a few
times in the past week. Whats up with that?

Ben


[twitter-dev] Re: 503 with gigantic retry-after value

2009-10-29 Thread Chad Etzel

Hi Ben,

It sounds like that value is a unix timestamp, which is a bug. The
retry-value should be a seconds from now value... The search team is
investigating. Thanks for reporting.
-Chad

On Thu, Oct 29, 2009 at 2:00 PM, Benjamin Darfler b...@bdarfler.com wrote:

 We are using the search api and respecting the 503 and retry-after
 values however I've seen a retry value in the 40 YEARS range a few
 times in the past week. Whats up with that?

 Ben



[twitter-dev] DM Delete API

2009-10-29 Thread Jesse Stay
I have a service that automatically deletes DMs that match certain keywords
on behalf of users.  This has been particularly beneficial in the wake of
the recent worms going around.  Our users get a couple when the worms start
propagating, but after that, they're protected because of some of the
technologies we have in place.  The problem with this is that most Twitter
clients out there don't check for past DMs that were deleted, so the users'
DMs still show up in their timeline.  This is understandably a hard issue to
tackle because right now the only way to know a past DM was deleted is to
re-search their DMs for deletion.

I have two suggestions - the first is to Twitter.  Is there a way Twitter
can provide some sort of live deletion API notifying developers and Apps
when messages are deleted so they can remove them also from their clients?

My second suggestion is to developers.  I have an API for this if you're
interested.  If you're open to searching our DM database for DMs, we'll
provide you the clean DMs that users have opted to receive, and leave out
the bad DMs.  This way those deleted won't show up in your client.  I am
also open to working with you on a live deletion API where my app notifies
you of deleted DMs, along with an API letting your users set keywords, get
keywords, etc. that the users have filtered.  I think there's huge potential
here to clean up Twitter if client developers are willing to work with us on
this.  Let me know if any of you are interested.

Ryan, et. al, I'd love to expose this to Twitter.com as well if you guys are
interested.

Jesse


[twitter-dev] Re: Twitter connection giving a 502 Bad Gateway error

2009-10-29 Thread Andrew Badera

++ to that. But be gentle.

∞ Andy Badera
∞ +1 518-641-1280
∞ This email is: [ ] bloggable [x] ask first [ ] private
∞ Google me: http://www.google.com/search?q=andrew%20badera



On Thu, Oct 29, 2009 at 1:55 PM, Dave Briccetti da...@davebsoft.com wrote:

 I’ve learned that wrapping every Twitter Web service call with retry
 logic is essential.

 http://github.com/dcbriccetti/talking-puffin/blob/master/twitter-api/src/main/scala/org/talkingpuffin/twitter/Http.scala
 http://github.com/dcbriccetti/talking-puffin/blob/master/twitter-api/src/main/scala/org/talkingpuffin/twitter/HttpRunner.scala



[twitter-dev] Search API: Can you have OR relationship with author and keywords?

2009-10-29 Thread Mike

We are trying to do a search where the results can come from two
keywords, or from an author.

It seems that the search API has an AND relationship between the
author and keywords.  If you specify an author, it searches for the
keywords only within that author's tweets.

For instance, our author is called louisvillemojo.  We want to have
a search return results from Louisville mojo, or keywords louisville
kentucky.  So it would find recent tweets that contain louisville
or kentucky, or tweets from user louisvillemojo.

Can this be done?

Thanks in advance for any help!

Mike


[twitter-dev] Re: Search API: Can you have OR relationship with author and keywords?

2009-10-29 Thread Chad Etzel

If you do something like:

from:louisvillemojo OR louisville OR kentucky

it will do what you describe, but if you want to do something like

from:louisvillemojo OR (louisville AND kentucky)
then it will not work. You would have to do 2 separate queries in that case.

-Chad

On Thu, Oct 29, 2009 at 3:01 PM, Mike mike8...@gmail.com wrote:

 We are trying to do a search where the results can come from two
 keywords, or from an author.

 It seems that the search API has an AND relationship between the
 author and keywords.  If you specify an author, it searches for the
 keywords only within that author's tweets.

 For instance, our author is called louisvillemojo.  We want to have
 a search return results from Louisville mojo, or keywords louisville
 kentucky.  So it would find recent tweets that contain louisville
 or kentucky, or tweets from user louisvillemojo.

 Can this be done?

 Thanks in advance for any help!

 Mike



[twitter-dev] Re: Twitter connection giving a 502 Bad Gateway error

2009-10-29 Thread hima latha
I tried running the code on every other day for like a week now. I tried it
continusly but it is not working anymore. Has this got to do with any Ip
addresses being blocked? To confirm this, I tried running the code on
different computers but with no success.

On Thu, Oct 29, 2009 at 12:53 PM, Adam Green a...@vibemetrix.com wrote:


 I'm also getting intermittent 502 errors, so I don't think this is
 code specific. I am calling the search API and getting a 502 error
 every couple of hours. The vast majority of API calls are working.
 Repeating the call after a 502 error generally works.

 On Oct 29, 11:41 am, hima himaca...@gmail.com wrote:
  Hi
  I am trying to collect users data from twitter, like the number of
  followers, number of tweets, the time the user' account is alive and
  similar statistics. I have done this before in august and got
  appropriate results with my code.I ran the code again a week ago and
  it worked and gave me results. The same code however, stopped working
  since a week now responding with a 502 bad gateway error. I am not
  able to connect to the twitter page and get the xml body. This is my
  function to return the xml page:
 
  public static String webget(String host, String doc, String username,
  String password)
  {
  String body = ;
  byte[] auth = Base64.decode(username + : + password );
  String header = Get  + doc +  HTTP/1.0\r\n;
  header += Authorization: Basic  + auth ;
  header += Accept: application/xml, text/plain, text/xml,
 text/*\r
  \n;
  header += \r\n;
 
  try
  {
  Socket sock = new Socket(host, 80);
  OutputStreamWriter os = new
 OutputStreamWriter(sock.getOutputStream
  ());
  os.write(header);
  os.flush();
  sock.getOutputStream().flush();
 
  BufferedReader br = new BufferedReader(new
  InputStreamReader(sock.getInputStream()));
  String str = null;
  while ( (str = br.readLine()) != null)
  {
  body += str + \n;
  }
  sock.close();
  }
  catch(IOException ioe)
  {
  return ;
  }
 
  return body;
  }
 
  This function is called like this:
 
  webget(twitter.com, /users/show/+UserId+.xml, USERNAME,
  PASSWORD)
 
  I have not made any changes to the code since august. I am guessing
  there have been changes in the twitter API which is giving me this
  error.However, nothing like this is mentioned in the forums. Can you
  let me know if there are changes in the twitter API that is causing
  this?
 
  Thanks
  Hima



[twitter-dev] Twitter Lists Need Optional Hashtag binding with list subscription

2009-10-29 Thread leonspencer

The new lists are a great way reduce the clutter in timeline. However,
I immediately notice management problems with the lists where tweets
are duplicate in timeline and list for tweets that have nothing to do
with the list. For example, let's say I have a sports list:

http://twitter.com/#/list/leonspencer/sports

I add userA that tweets about sports. But userA also tweets about
food. And being a friend, userA will tweet about personal stuff.

If a user tweets about sports, dining, and personal stuff, ALL of
these tweets are shown under the sports list as well as my timeline.
Furthermore, if I create a second list for food/dining and add userA,
ALL of the tweets regardless of food or sports will display under both
lists.

So what would be great is for Twitter to allow the optional
specification of one or more hashtags when associating an account with
a list, which would indicate tweets from that account should only
appear under this list IF these hashtags are part of the tweet.

Leon


[twitter-dev] Re: Twitter Lists Need Optional Hashtag binding with list subscription

2009-10-29 Thread Chad Etzel
This sounds like a 3rd party API application opportunity to me...
-Chad

On Thu, Oct 29, 2009 at 7:11 PM, leonspencer spencer_l...@yahoo.com wrote:


 The new lists are a great way reduce the clutter in timeline. However,
 I immediately notice management problems with the lists where tweets
 are duplicate in timeline and list for tweets that have nothing to do
 with the list. For example, let's say I have a sports list:

 http://twitter.com/#/list/leonspencer/sports

 I add userA that tweets about sports. But userA also tweets about
 food. And being a friend, userA will tweet about personal stuff.

 If a user tweets about sports, dining, and personal stuff, ALL of
 these tweets are shown under the sports list as well as my timeline.
 Furthermore, if I create a second list for food/dining and add userA,
 ALL of the tweets regardless of food or sports will display under both
 lists.

 So what would be great is for Twitter to allow the optional
 specification of one or more hashtags when associating an account with
 a list, which would indicate tweets from that account should only
 appear under this list IF these hashtags are part of the tweet.

 Leon



[twitter-dev] Re: Twitter Lists Need Optional Hashtag binding with list subscription

2009-10-29 Thread Leon Spencer
I don't think a 3rd party app would work - with Oauth or like a TweetDeck. The 
searches and updates would do well beyond Twitter limits and impact user's 
ability to perform other functions.

Plus having the hashtags would reduce load on bandwidth anyway, right? Each 
time you pull this lists that are duplicating tweet results?

But I'm listening. How would you see a 3rd party app solving this problem when 
the lists are filters?

Leon




From: Chad Etzel c...@twitter.com
To: twitter-development-talk@googlegroups.com
Sent: Thu, October 29, 2009 4:14:58 PM
Subject: [twitter-dev] Re: Twitter Lists Need Optional Hashtag binding with  
list subscription

This sounds like a 3rd party API application opportunity to me...
-Chad


On Thu, Oct 29, 2009 at 7:11 PM, leonspencer spencer_l...@yahoo.com wrote:


The new lists are a great way reduce the clutter in timeline. However,
I immediately notice management problems with the lists where tweets
are duplicate in timeline and list for tweets that have nothing to do
with the list. For example, let's say I have a sports list:

http://twitter.com/#/list/leonspencer/sports

I add userA that tweets about sports. But userA also tweets about
food. And being a friend, userA will tweet about personal stuff.

If a user tweets about sports, dining, and personal stuff, ALL of
these tweets are shown under the sports list as well as my timeline.
Furthermore, if I create a second list for food/dining and add userA,
ALL of the tweets regardless of food or sports will display under both
lists.

So what would be great is for Twitter to allow the optional
specification of one or more hashtags when associating an account with
a list, which would indicate tweets from that account should only
appear under this list IF these hashtags are part of the tweet.

Leon



[twitter-dev] White listing rejected - no reason

2009-10-29 Thread Arnaldo de Moraes Pereira
Hello,

I've submitted my application to be on the white list, but this request has
been rejected, without a reason.

For some weeks now, I've been receiving 400 Bad Request http responses
frequently and didn't reach the rate limit, not once (
http://apiwiki.twitter.com/Rate-limiting says the app would receive 503 if
the rate limit was reached). I just can't fetch fresh updates (just old,
delayed ones), can't get directions here to understand why this is happening
and now I can't be white listed.

I'd ask for an answer and a direction here, but since that seems hard to
get: may please somebody tell me anything useful about this situation?

Thanks,

-- 
Arnaldo M Pereira


[twitter-dev] Re: White listing rejected - no reason

2009-10-29 Thread Chad Etzel
Email your username to a...@twitter.com and we can look up the reason and
help you figure things out.
-Chad

On Thu, Oct 29, 2009 at 7:50 PM, Arnaldo de Moraes Pereira 
eggh...@gmail.com wrote:

 Hello,

 I've submitted my application to be on the white list, but this request has
 been rejected, without a reason.

 For some weeks now, I've been receiving 400 Bad Request http responses
 frequently and didn't reach the rate limit, not once (
 http://apiwiki.twitter.com/Rate-limiting says the app would receive 503 if
 the rate limit was reached). I just can't fetch fresh updates (just old,
 delayed ones), can't get directions here to understand why this is happening
 and now I can't be white listed.

 I'd ask for an answer and a direction here, but since that seems hard to
 get: may please somebody tell me anything useful about this situation?

 Thanks,

 --
 Arnaldo M Pereira



[twitter-dev] Blocked from stream.twitter.com

2009-10-29 Thread Robert Hartung

Hello,

i mady my own little application for twitter which ended in many
problems and errors finally.

I rewrote my Stream API and now it works perfectly but unfortunately I
am not able to connect from the server to stream.twitter.com:80 - on
any other server I am able to connect to it - Any ideas how to remove
me from the banned list?

Log from a telnet connection on a blocked server:
s196:~# telnet stream.twitter.com 80
Trying 128.121.146.231...
Connected to stream.twitter.com.
Escape character is '^]'.
Connection closed by foreign host.

the connection is closed immedeately after it is established.

Any ideas on this?

Yours
Robert Hartung


[twitter-dev] Re: Blocked from stream.twitter.com

2009-10-29 Thread Chad Etzel

I've forwarded your information. We'll reply to you privately.
-Chad

On Thu, Oct 29, 2009 at 5:45 PM, Robert Hartung robert-hart...@web.de wrote:

 Hello,

 i mady my own little application for twitter which ended in many
 problems and errors finally.

 I rewrote my Stream API and now it works perfectly but unfortunately I
 am not able to connect from the server to stream.twitter.com:80 - on
 any other server I am able to connect to it - Any ideas how to remove
 me from the banned list?

 Log from a telnet connection on a blocked server:
 s196:~# telnet stream.twitter.com 80
 Trying 128.121.146.231...
 Connected to stream.twitter.com.
 Escape character is '^]'.
 Connection closed by foreign host.

 the connection is closed immedeately after it is established.

 Any ideas on this?

 Yours
 Robert Hartung



[twitter-dev] Re: Twitter connection giving a 502 Bad Gateway error

2009-10-29 Thread Chad Etzel

If you are getting a response from the servers (even error codes) then
you are not blocked. A blacklisted IP looks like it goes into a
blackhole and no data is returned, ever.

Are you able to ping and traceroute to twitter.com?

-Chad

On Thu, Oct 29, 2009 at 2:11 PM, hima latha himaca...@gmail.com wrote:
 I tried running the code on every other day for like a week now. I tried it
 continusly but it is not working anymore. Has this got to do with any Ip
 addresses being blocked? To confirm this, I tried running the code on
 different computers but with no success.

 On Thu, Oct 29, 2009 at 12:53 PM, Adam Green a...@vibemetrix.com wrote:

 I'm also getting intermittent 502 errors, so I don't think this is
 code specific. I am calling the search API and getting a 502 error
 every couple of hours. The vast majority of API calls are working.
 Repeating the call after a 502 error generally works.

 On Oct 29, 11:41 am, hima himaca...@gmail.com wrote:
  Hi
  I am trying to collect users data from twitter, like the number of
  followers, number of tweets, the time the user' account is alive and
  similar statistics. I have done this before in august and got
  appropriate results with my code.I ran the code again a week ago and
  it worked and gave me results. The same code however, stopped working
  since a week now responding with a 502 bad gateway error. I am not
  able to connect to the twitter page and get the xml body. This is my
  function to return the xml page:
 
  public static String webget(String host, String doc, String username,
  String password)
          {
                  String body = ;
                  byte[] auth = Base64.decode(username + : + password );
                  String header = Get  + doc +  HTTP/1.0\r\n;
                  header += Authorization: Basic  + auth ;
                  header += Accept: application/xml, text/plain,
  text/xml, text/*\r
  \n;
                  header += \r\n;
 
                  try
                  {
                          Socket sock = new Socket(host, 80);
                          OutputStreamWriter os = new
  OutputStreamWriter(sock.getOutputStream
  ());
                          os.write(header);
                          os.flush();
                          sock.getOutputStream().flush();
 
                          BufferedReader br = new BufferedReader(new
                          InputStreamReader(sock.getInputStream()));
                          String str = null;
                          while ( (str = br.readLine()) != null)
                          {
                                  body += str + \n;
                          }
                          sock.close();
                  }
                  catch(IOException ioe)
                  {
                          return ;
                  }
 
                  return body;
          }
 
  This function is called like this:
 
  webget(twitter.com, /users/show/+UserId+.xml, USERNAME,
  PASSWORD)
 
  I have not made any changes to the code since august. I am guessing
  there have been changes in the twitter API which is giving me this
  error.However, nothing like this is mentioned in the forums. Can you
  let me know if there are changes in the twitter API that is causing
  this?
 
  Thanks
  Hima




[twitter-dev] Re: API call accounting by account rather than IP for non-authenticated requests

2009-10-29 Thread Chad Etzel

This is the current behavior, as far as I can tell.

I just made a call to users/show to a public account (one which
normally would not require authentication), but I used my
username/password in the request. The rate-limit for my username
decremented and the rate-limit for my IP did not.

Is this not what you see?

-Chad

On Thu, Oct 29, 2009 at 11:12 AM, Terry Jones te...@fluidinfo.com wrote:

 I just submitted a whitelisting request, along with a comment along the
 following lines:

 I think it would be good if Twitter did API call accounting based on the
 HTTP auth header whenever one is sent - even if the call itself does not
 require auth.

 I'm at home right now and although my account (@terrycojones) is
 whitelisted, my home IP is not. So while I can make a decent number of
 authenticated calls, I can't do much with the app I'm trying to write as
 it's making non-authenticated calls. The non-authenticated calls are
 accounted for by IP. Even if my home IP were whitelisted, I'd be stuck if I
 were in a hotel.

 The concrete suggestion is: to always do API call accounting based on the
 passed auth details, and if no auth information is passed, then fall back
 to IP-based accounting.

 That wouldn't change much and is backwards compatible. Auth requiring calls
 would be just as they were. But in the case of non-auth requiring calls,
 the developer would have the choice: send auth to get account based
 accounting, don't send it to get IP based accounting.

 Terry



[twitter-dev] Re: Twitter Lists Need Optional Hashtag binding with list subscription

2009-10-29 Thread JDG
pull the whole list and do the filtering in-memory yourself. It's not a
perfect solution, in terms of bandwidth or processing, but there it is.

On Thu, Oct 29, 2009 at 17:22, Leon Spencer spencer_l...@yahoo.com wrote:

 I don't think a 3rd party app would work - with Oauth or like a TweetDeck.
 The searches and updates would do well beyond Twitter limits and impact
 user's ability to perform other functions.

 Plus having the hashtags would reduce load on bandwidth anyway, right? Each
 time you pull this lists that are duplicating tweet results?

 But I'm listening. How would you see a 3rd party app solving this problem
 when the lists are filters?

 Leon

 --
 *From:* Chad Etzel c...@twitter.com
 *To:* twitter-development-talk@googlegroups.com
 *Sent:* Thu, October 29, 2009 4:14:58 PM
 *Subject:* [twitter-dev] Re: Twitter Lists Need Optional Hashtag binding
 with list subscription

 This sounds like a 3rd party API application opportunity to me...
 -Chad

 On Thu, Oct 29, 2009 at 7:11 PM, leonspencer spencer_l...@yahoo.comwrote:


 The new lists are a great way reduce the clutter in timeline. However,
 I immediately notice management problems with the lists where tweets
 are duplicate in timeline and list for tweets that have nothing to do
 with the list. For example, let's say I have a sports list:

 http://twitter.com/#/list/leonspencer/sports

 I add userA that tweets about sports. But userA also tweets about
 food. And being a friend, userA will tweet about personal stuff.

 If a user tweets about sports, dining, and personal stuff, ALL of
 these tweets are shown under the sports list as well as my timeline.
 Furthermore, if I create a second list for food/dining and add userA,
 ALL of the tweets regardless of food or sports will display under both
 lists.

 So what would be great is for Twitter to allow the optional
 specification of one or more hashtags when associating an account with
 a list, which would indicate tweets from that account should only
 appear under this list IF these hashtags are part of the tweet.

 Leon





-- 
Internets. Serious business.


[twitter-dev] Re: Twitter Lists Need Optional Hashtag binding with list subscription

2009-10-29 Thread Harshad RJ
I am more interested in the converse use-case; I would like to tweet about
my sporting life only to the sporties list created by me. Is this possible
/ planned ?

(Alright, I will be honest; replace sports with tech for me)

On Fri, Oct 30, 2009 at 4:44 AM, Chad Etzel c...@twitter.com wrote:

 This sounds like a 3rd party API application opportunity to me...
 -Chad


 On Thu, Oct 29, 2009 at 7:11 PM, leonspencer spencer_l...@yahoo.comwrote:


 The new lists are a great way reduce the clutter in timeline. However,
 I immediately notice management problems with the lists where tweets
 are duplicate in timeline and list for tweets that have nothing to do
 with the list. For example, let's say I have a sports list:

 http://twitter.com/#/list/leonspencer/sports

 I add userA that tweets about sports. But userA also tweets about
 food. And being a friend, userA will tweet about personal stuff.

 If a user tweets about sports, dining, and personal stuff, ALL of
 these tweets are shown under the sports list as well as my timeline.
 Furthermore, if I create a second list for food/dining and add userA,
 ALL of the tweets regardless of food or sports will display under both
 lists.

 So what would be great is for Twitter to allow the optional
 specification of one or more hashtags when associating an account with
 a list, which would indicate tweets from that account should only
 appear under this list IF these hashtags are part of the tweet.

 Leon





-- 
Harshad RJ
http://hrj.wikidot.com


[twitter-dev] Re: Twitter Lists Need Optional Hashtag binding with list subscription

2009-10-29 Thread JDG
the only way right now to direct your tweets to a subset of users is to
make them protected or to DM users. The whole point of tweeting, so far as I
can tell, is to let everyone read it (at least, in the case of public
tweets).

On Thu, Oct 29, 2009 at 20:47, Harshad RJ harshad...@gmail.com wrote:

 I am more interested in the converse use-case; I would like to tweet about
 my sporting life only to the sporties list created by me. Is this possible
 / planned ?

 (Alright, I will be honest; replace sports with tech for me)


 On Fri, Oct 30, 2009 at 4:44 AM, Chad Etzel c...@twitter.com wrote:

 This sounds like a 3rd party API application opportunity to me...
 -Chad


 On Thu, Oct 29, 2009 at 7:11 PM, leonspencer spencer_l...@yahoo.comwrote:


 The new lists are a great way reduce the clutter in timeline. However,
 I immediately notice management problems with the lists where tweets
 are duplicate in timeline and list for tweets that have nothing to do
 with the list. For example, let's say I have a sports list:

 http://twitter.com/#/list/leonspencer/sports

 I add userA that tweets about sports. But userA also tweets about
 food. And being a friend, userA will tweet about personal stuff.

 If a user tweets about sports, dining, and personal stuff, ALL of
 these tweets are shown under the sports list as well as my timeline.
 Furthermore, if I create a second list for food/dining and add userA,
 ALL of the tweets regardless of food or sports will display under both
 lists.

 So what would be great is for Twitter to allow the optional
 specification of one or more hashtags when associating an account with
 a list, which would indicate tweets from that account should only
 appear under this list IF these hashtags are part of the tweet.

 Leon





 --
 Harshad RJ
 http://hrj.wikidot.com




-- 
Internets. Serious business.


[twitter-dev] Re: Twitter Lists Need Optional Hashtag binding with list subscription

2009-10-29 Thread Harshad RJ
If *to tweet* is *to blog*, I am basically looking for blog categories. I
was hoping lists might be a way to categorize the tweets.

But if there was direct support for categories then both the OP's use-case
and mine would be covered. When you follow a person, you could specify which
categories to watch. And when a person posts something, she could specify
which categories to post under. Uncategorised posts would go to every
follower's timeline.

The way the lists currently seem to work, I am likely to be bombarded with
information even if I follow a small number of lists!

On Fri, Oct 30, 2009 at 8:28 AM, JDG ghil...@gmail.com wrote:

 the only way right now to direct your tweets to a subset of users is to
 make them protected or to DM users. The whole point of tweeting, so far as I
 can tell, is to let everyone read it (at least, in the case of public
 tweets).

 On Thu, Oct 29, 2009 at 20:47, Harshad RJ harshad...@gmail.com wrote:

 I am more interested in the converse use-case; I would like to tweet about
 my sporting life only to the sporties list created by me. Is this possible
 / planned ?

 (Alright, I will be honest; replace sports with tech for me)


 On Fri, Oct 30, 2009 at 4:44 AM, Chad Etzel c...@twitter.com wrote:

 This sounds like a 3rd party API application opportunity to me...
 -Chad


 On Thu, Oct 29, 2009 at 7:11 PM, leonspencer spencer_l...@yahoo.comwrote:


 The new lists are a great way reduce the clutter in timeline. However,
 I immediately notice management problems with the lists where tweets
 are duplicate in timeline and list for tweets that have nothing to do
 with the list. For example, let's say I have a sports list:

 http://twitter.com/#/list/leonspencer/sports

 I add userA that tweets about sports. But userA also tweets about
 food. And being a friend, userA will tweet about personal stuff.

 If a user tweets about sports, dining, and personal stuff, ALL of
 these tweets are shown under the sports list as well as my timeline.
 Furthermore, if I create a second list for food/dining and add userA,
 ALL of the tweets regardless of food or sports will display under both
 lists.

 So what would be great is for Twitter to allow the optional
 specification of one or more hashtags when associating an account with
 a list, which would indicate tweets from that account should only
 appear under this list IF these hashtags are part of the tweet.

 Leon





 --
 Harshad RJ
 http://hrj.wikidot.com




 --
 Internets. Serious business.




-- 
Harshad RJ
http://hrj.wikidot.com


[twitter-dev] Re: Twitter Lists Need Optional Hashtag binding with list subscription

2009-10-29 Thread Dave Briccetti

I doubt I will follow many (or any) lists. But I will scour them
periodically for individuals to follow.


[twitter-dev] Re: Twitter Lists Need Optional Hashtag binding with list subscription

2009-10-29 Thread Leon Spencer
JDG,

I appreciate your response. That works if your trying to develop your on 
separate client/dusplay e.g. TweetDeck. 

But that doesn't help with updating the list displayed in Twitter. This more of 
a Twitter.com issue than a Twitter API issue. But I posted here anyway in hopes 
development would pickup on it. 

As it stands right now, the Twitter.com lists display is cluttered. We're just 
moving the clutter from timeline to the multiple lists. And when Twitter API 
developers go to query these lists from Twitter API, the results don't tell you 
much about the tweets in the list. Like you said, we'll have to use hashtags 
and scan the list results. 

Leon





From: JDG ghil...@gmail.com
To: twitter-development-talk@googlegroups.com
Sent: Thu, October 29, 2009 6:02:28 PM
Subject: [twitter-dev] Re: Twitter Lists Need Optional Hashtag binding  with 
list subscription

pull the whole list and do the filtering in-memory yourself. It's not a perfect 
solution, in terms of bandwidth or processing, but there it is.


On Thu, Oct 29, 2009 at 17:22, Leon Spencer spencer_l...@yahoo.com wrote:

I don't think a 3rd party app would work - with Oauth or like a TweetDeck. The 
searches and updates would do well beyond Twitter limits and impact user's 
ability to perform other functions.

Plus having the hashtags would reduce load on bandwidth anyway, right? Each 
time you pull this lists that are duplicating tweet results?

But I'm listening. How would you see a 3rd party app solving this problem when 
the lists are filters?

Leon


[twitter-dev] Re: Twitter Lists Need Optional Hashtag binding with list subscription

2009-10-29 Thread Leon Spencer
Cool. Don't get me wrong. I think the lists are great for indirectly following 
people. I don't know how this impacts follower limits given on Twitter.com you 
don't have to follow someone to add them to one of your lists.

And like you I don't use list to follow people. I mainly use them to free-up 
the friends timeline and group specialized tweets.






From: Dave Briccetti da...@davebsoft.com
To: Twitter Development Talk twitter-development-talk@googlegroups.com
Sent: Thu, October 29, 2009 9:32:27 PM
Subject: [twitter-dev] Re: Twitter Lists Need Optional Hashtag binding with 
list  subscription


I doubt I will follow many (or any) lists. But I will scour them
periodically for individuals to follow.