Re: [twitter-dev] Re: Introducing the Follow Button

2011-05-31 Thread Dan Webb
Hi Zazie,

On Tue, May 31, 2011 at 1:43 PM, Zazie Lavender zazielaven...@gmail.com wrote:
 This is great, but I worry that this might easily be abused. The code
 for a follow button seems written in a way that allows the user to
 redress the link however they please. I see the main intent url as
 being easily extracted for no-js users; but this means someone could
 take that URL, redress it as a link someone would WANT to click on and
 fool people into clicking such a button to boost their own follower
 counts.


We have anti-CSRF protection to prevent the follow endpoint being used
outside of the button.  We also have malware detection in place so we
can quickly shut down abusive sites.

Thanks,

-- 
Dan Webb
Technical Lead, Twitter For Websites
d...@twitter.com / @danwrong

-- 
Twitter developer documentation and resources: https://dev.twitter.com/doc
API updates via Twitter: https://twitter.com/twitterapi
Issues/Enhancements Tracker: https://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
https://groups.google.com/forum/#!forum/twitter-development-talk


[twitter-dev] Search API vs Phoenix search (speed of indexing)

2011-02-25 Thread Dan
Hi,

I am developing a browser-based client side app that is making use of the 
search API.

I have noticed for certain terms, in the documented API it is very slow to 
index new tweets : e.g. right now the term 'Glazers' is trending in the UK, 
and the most recent tweet for that search term is six minutes old.

If I do the exact same search in new twitter (using the undocumented phoenix 
search - i.e: http://twitter.com/phoenix_search.phoenix?...;), the most 
recent term is 53 seconds old (and there are many more newer than the most 
recent one returned from the search API)

So for this search term, phoenix is well ahead of the documented API.

The weird thing is for many other search terms they are returning results at 
the same speed (e.g. George Harrison right now)

Is this a (known ? ) bug?

Have twitter deliberately given themselves a superior API?

Any advice would be much appreciated.

Aside: I know I could use the streaming API, but I am trying to write this 
client side, and the streaming API does not yet support web sockets, so I 
don't think this is an option right now. I know of the flash plugin ( 
http://mehack.com/twitter-streaming-api-from-javascript-with-a ) but that is 
only for proofs of concept right now, and there is no way of using oauth.

Cheers

Dan

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


Re: [twitter-dev] Getting Started

2011-02-17 Thread Dan
Does anyone have a working example of using the jtwitter library using 
callbacks?  

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


Re: [twitter-dev] Re: Twitter OAuth PHP - Submit tweets without user login?

2011-02-17 Thread Dan
This example finally made sense of the whole thing and now I am up and 
running. 

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


[twitter-dev] Getting Started

2011-02-16 Thread Dan
Hello,

I am just getting started developing some proofs-of-concept for my
company. One major snag is that I am of course behind a firewall. The
OAuth API expects a URL that is available to twitter.com. I can't
really do much more unless I start opening some ports (frowned upon).
What solutions have other developers in the same position used?

I also would like to avoid any user interaction with twitter (should
be completely opaque). From reading the documentation it would appear
that the XAuth is better suited to my use case. What experience have
people had with this?

Thanks for your time...

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


Re: [twitter-dev] twurl with streaming API?

2010-12-26 Thread Dan Checkoway
Matt,

Thanks for the --no-ssl trick, much appreciated!  That was staring me right
in the face with the --help output and I still managed not to see it.

No worries, I'm only trying to use twurl for a test.  We do use twitter4j
for live firehose access.

Thanks,
Dan

On Sun, Dec 26, 2010 at 10:54 AM, Matt Harris thematthar...@twitter.comwrote:

 Hi Dan,

 The Track/Sample Streaming API doesn't support SSL which twurl enables by
 default. You need to instruct twurl to not use SSL when making requests. For
 example:
 twurl --no-ssl -t -H stream.twitter.com /1/statuses/sample.json

 This is ok for testing and debugging but you want to look at something like
 twitter4j or phirehose as a programatic way to consume the Streaming API.

 Best,
 @themattharris
 Developer Advocate, Twitter
 http://twitter.com/themattharris


 On Sun, Dec 26, 2010 at 12:42 AM, dcheckoway dchecko...@gmail.com wrote:

 After authorizing with twurl I tried this:

 $ twurl -t -H stream.twitter.com /1/statuses/sample.json
 opening connection to stream.twitter.com...

 ...and it just sits there.  Anybody know if there's a way to use twurl
 with the streaming API?

 I can use curl no problem with basic auth, but that's pretty lame and
 short-lived.  It would be nice if twurl supported the streaming API.
 If it does, can you clue me in?

 Thanks,
 Dan

 --
 Twitter developer documentation and resources: http://dev.twitter.com/doc
 API updates via Twitter: http://twitter.com/twitterapi
 Issues/Enhancements Tracker:
 http://code.google.com/p/twitter-api/issues/list
 Change your membership to this group:
 http://groups.google.com/group/twitter-development-talk


  --
 Twitter developer documentation and resources: http://dev.twitter.com/doc
 API updates via Twitter: http://twitter.com/twitterapi
 Issues/Enhancements Tracker:
 http://code.google.com/p/twitter-api/issues/list
 Change your membership to this group:
 http://groups.google.com/group/twitter-development-talk


-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


Re: [twitter-dev] 4294967295

2010-12-23 Thread Dan Checkoway
Cool, I appreciate the response.  I forgot to mention, although you guys
probably know this by now...originally it was just the firehose on which we
saw those funky values, but lately we've been seeing them in the wild as
well.

Thanks again, Taylor.

Dan

On Wed, Dec 22, 2010 at 10:56 PM, Taylor Singletary 
taylorsinglet...@twitter.com wrote:

 It's going to be a little bit of time before we can totally prevent these
 values from occurring.

 Right now, you should probably just consider this value as unknown rather
 than necessarily null, 0, or otherwise. The team responsible for the low
 level component causing the bug has a fix planned, but it can't be applied
 until a few more dependencies are resolved.

 Thanks,
 Taylor

 On Wed, Dec 22, 2010 at 2:59 PM, Dan Checkoway dchecko...@gmail.comwrote:

 I just wanted to follow up on this, because the issue continues to happen,
 and it gets more and more interesting.

 We've now been seeing user.listed_count coming back as 4294967293 on
 occasion.  So just to recap, we have now seen these values in the
 user.listed_count field:

 4294967295 (a.k.a. unsigned -1)
 4294967294 (a.k.a. unsigned -2)
 4294967293 (a.k.a. unsigned -3)

 twitter4j has worked around this issue no problem, but I'm more than just
 a bit curious what these values represent.  Should -1 and -2 and -3 be
 treated to mean anything other than we don't know what the listed count
 is?  What happens if/when -4 starts popping out?

 I realize this is pretty low priority, but it's still a bug...

 Thanks,
 Dan


 On Fri, Dec 17, 2010 at 7:17 AM, Dan Checkoway dchecko...@gmail.comwrote:

 Check this out...today sometime between 4:01:43 AM PST and 4:01:53 AM PST
 (sorry for the ambiguity, those are our every 10 sec logging timestamps
 for other stuff), we saw the unsigned equivalent of -2 (4294967294) being
 sent by twitter in user.listed_count...


 Exception in thread Twitter Stream Handling Thread[Receiving stream]
 java.lang
 .NumberFormatException: For input string: 4294967294

 at
 java.lang.NumberFormatException.forInputString(NumberFormatException.
 java:48)
 at java.lang.Integer.parseInt(Integer.java:459)
 at java.lang.Integer.valueOf(Integer.java:553)
 at twitter4j.internal.util.ParseUtil.getInt(ParseUtil.java:120)
 at twitter4j.UserJSONImpl.init(UserJSONImpl.java:103)
  at twitter4j.UserJSONImpl.init(UserJSONImpl.java:86)
 at twitter4j.StatusJSONImpl.init(StatusJSONImpl.java:101)
 at twitter4j.StatusJSONImpl.init(StatusJSONImpl.java:84)
 at twitter4j.StatusJSONImpl.init(StatusJSONImpl.java:118)
 at twitter4j.StatusJSONImpl.init(StatusJSONImpl.java:84)
 at
 twitter4j.StatusStreamImpl.handleNextElement(StatusStreamImpl.java:116)
 at twitter4j.StatusStreamImpl.next(StatusStreamImpl.java:89)
 at
 twitter4j.TwitterStream$StreamHandlingThread.run(TwitterStream.java:529)

 Any idea what's going on and/or when it might be fixed?

 Thanks,
 Dan


 On Tue, Dec 14, 2010 at 8:10 PM, Taylor Singletary 
 taylorsinglet...@twitter.com wrote:

 Thanks! This is being looked into. I'll update when I have news.

 Taylor

 On Tuesday, December 14, 2010, Dan Checkoway dchecko...@gmail.com
 wrote:
  Yeah, you bet.  Twitter4j isn't logging a timestamp when it happens,
 but here are a handful of timestamps for unrelated stuff that got logged no
 more than 10 seconds *prior* to the 4294967295 error popping out...so
 they're fairly close:
 
  Dec 14, 2010 12:34:11 PM PST
  Dec 14, 2010 1:13:07 PM PST
  Dec 14, 2010 1:22:48 PM PST
  Dec 14, 2010 1:27:22 PM PST
  Dec 14, 2010 1:29:48 PM PST
  Dec 14, 2010 1:33:36 PM PST
 
  Based on the twitter4j stack trace, I can tell you that it was
 *always* user.listed_count that had the funky value:
 
  Exception in thread Twitter Stream Handling Thread[Receiving stream]
 java.lang
  .NumberFormatException: For input string: 4294967295
  at
 java.lang.NumberFormatException.forInputString(NumberFormatException.
  java:48)
  at java.lang.Integer.parseInt(Integer.java:459)
  at java.lang.Integer.valueOf(Integer.java:553)
  at
 twitter4j.internal.util.ParseUtil.getInt(ParseUtil.java:120)
  at twitter4j.UserJSONImpl.init(UserJSONImpl.java:103)
 
  Thanks,
  Dan
 
  On Tue, Dec 14, 2010 at 6:42 PM, Taylor Singletary 
 taylorsinglet...@twitter.com wrote:
  Understandable, Dan.
 
  Can you tell me the last time an event like this happened?
 
  Taylor
 
  On Tue, Dec 14, 2010 at 3:41 PM, Dan Checkoway dchecko...@gmail.com
 wrote:
  I know this is the weenie answer, but I haven't been able to track a
  specific offending JSON object down yet, since it only seems to
 happen on
  the firehose, and we're using twitter4j to process that.
 
  If we were able to connect to the firehose more than once at a time,
 I could
  easily write a tool to detect and highlight the issue.  Short of
 that, I'll
  try watching the sample stream for a while to see

Re: [twitter-dev] 4294967295

2010-12-22 Thread Dan Checkoway
I just wanted to follow up on this, because the issue continues to happen,
and it gets more and more interesting.

We've now been seeing user.listed_count coming back as 4294967293 on
occasion.  So just to recap, we have now seen these values in the
user.listed_count field:

4294967295 (a.k.a. unsigned -1)
4294967294 (a.k.a. unsigned -2)
4294967293 (a.k.a. unsigned -3)

twitter4j has worked around this issue no problem, but I'm more than just a
bit curious what these values represent.  Should -1 and -2 and -3 be treated
to mean anything other than we don't know what the listed count is?  What
happens if/when -4 starts popping out?

I realize this is pretty low priority, but it's still a bug...

Thanks,
Dan

On Fri, Dec 17, 2010 at 7:17 AM, Dan Checkoway dchecko...@gmail.com wrote:

 Check this out...today sometime between 4:01:43 AM PST and 4:01:53 AM PST
 (sorry for the ambiguity, those are our every 10 sec logging timestamps
 for other stuff), we saw the unsigned equivalent of -2 (4294967294) being
 sent by twitter in user.listed_count...


 Exception in thread Twitter Stream Handling Thread[Receiving stream]
 java.lang
 .NumberFormatException: For input string: 4294967294

 at
 java.lang.NumberFormatException.forInputString(NumberFormatException.
 java:48)
 at java.lang.Integer.parseInt(Integer.java:459)
 at java.lang.Integer.valueOf(Integer.java:553)
 at twitter4j.internal.util.ParseUtil.getInt(ParseUtil.java:120)
 at twitter4j.UserJSONImpl.init(UserJSONImpl.java:103)
 at twitter4j.UserJSONImpl.init(UserJSONImpl.java:86)
 at twitter4j.StatusJSONImpl.init(StatusJSONImpl.java:101)
 at twitter4j.StatusJSONImpl.init(StatusJSONImpl.java:84)
 at twitter4j.StatusJSONImpl.init(StatusJSONImpl.java:118)
 at twitter4j.StatusJSONImpl.init(StatusJSONImpl.java:84)
 at
 twitter4j.StatusStreamImpl.handleNextElement(StatusStreamImpl.java:116)
 at twitter4j.StatusStreamImpl.next(StatusStreamImpl.java:89)
 at
 twitter4j.TwitterStream$StreamHandlingThread.run(TwitterStream.java:529)

 Any idea what's going on and/or when it might be fixed?

 Thanks,
 Dan


 On Tue, Dec 14, 2010 at 8:10 PM, Taylor Singletary 
 taylorsinglet...@twitter.com wrote:

 Thanks! This is being looked into. I'll update when I have news.

 Taylor

 On Tuesday, December 14, 2010, Dan Checkoway dchecko...@gmail.com
 wrote:
  Yeah, you bet.  Twitter4j isn't logging a timestamp when it happens, but
 here are a handful of timestamps for unrelated stuff that got logged no more
 than 10 seconds *prior* to the 4294967295 error popping out...so they're
 fairly close:
 
  Dec 14, 2010 12:34:11 PM PST
  Dec 14, 2010 1:13:07 PM PST
  Dec 14, 2010 1:22:48 PM PST
  Dec 14, 2010 1:27:22 PM PST
  Dec 14, 2010 1:29:48 PM PST
  Dec 14, 2010 1:33:36 PM PST
 
  Based on the twitter4j stack trace, I can tell you that it was *always*
 user.listed_count that had the funky value:
 
  Exception in thread Twitter Stream Handling Thread[Receiving stream]
 java.lang
  .NumberFormatException: For input string: 4294967295
  at
 java.lang.NumberFormatException.forInputString(NumberFormatException.
  java:48)
  at java.lang.Integer.parseInt(Integer.java:459)
  at java.lang.Integer.valueOf(Integer.java:553)
  at twitter4j.internal.util.ParseUtil.getInt(ParseUtil.java:120)
  at twitter4j.UserJSONImpl.init(UserJSONImpl.java:103)
 
  Thanks,
  Dan
 
  On Tue, Dec 14, 2010 at 6:42 PM, Taylor Singletary 
 taylorsinglet...@twitter.com wrote:
  Understandable, Dan.
 
  Can you tell me the last time an event like this happened?
 
  Taylor
 
  On Tue, Dec 14, 2010 at 3:41 PM, Dan Checkoway dchecko...@gmail.com
 wrote:
  I know this is the weenie answer, but I haven't been able to track a
  specific offending JSON object down yet, since it only seems to happen
 on
  the firehose, and we're using twitter4j to process that.
 
  If we were able to connect to the firehose more than once at a time, I
 could
  easily write a tool to detect and highlight the issue.  Short of that,
 I'll
  try watching the sample stream for a while to see if the same issue
 pops up
  there.  Will report any findings...
 
  Thanks,
  Dan
 
  On Tue, Dec 14, 2010 at 6:19 PM, Taylor Singletary
  taylorsinglet...@twitter.com wrote:
 
  Hi Dan,
 
  Do you continue to see events like this happening? Can you provide a
  recent example in as-provided JSON or XML?
 
  Thanks,
  Taylor
 
  On Tue, Dec 14, 2010 at 2:13 PM, Dan Checkoway dchecko...@gmail.com
  wrote:
   Anybody else seeing user.listed_count occasionally coming back as
   4294967295?  That value just happens to equate to:  1 + (2 *
   Integer.MAX_VALUE)  Sure looks like an unsigned version of -1 to
 me...
  
   Anyway, it's breaking twitter4j.TwitterStream stuff.  I've mentioned
   that
   separately on the twitter4j list, but I wanted to raise the issue
 here
   since
   the root cause is twitter sending the weird

Re: [twitter-dev] firehose exception: the end of stream has been reached

2010-12-20 Thread Dan Checkoway
Thanks for the responses.  That's unfortunately not the case.  We've gone
massively concurrent with this (we've wrapped our own concurrent queueing
around twitter4j, which it looks like Yusuke has just updated to add his own
concurrent approach to this...thx), and falling behind on the stream is
definitely not the problem.

Bandwidth is not the problem.

I still don't understand why, right after reconnecting to the twitter
firehose, the stream just plain ends.  It's not happening after some time of
possibly falling behind...it happens right away.

To clarify, this is NOT an issue all the time.  And since I posted this the
other day, the problem has gone away as mysteriously as it arrived.  But it
does happen from time to time.  When everything else on my app's end is
steady-state, the flying fickle finger of blame points to twitter...  :-)

Thanks,
Dan


On Fri, Dec 17, 2010 at 1:57 PM, Matt Harris thematthar...@twitter.comwrote:

 Hey Dan,

 If you fall too far behind when receiving the stream we will disconnect
 you. Check the timestamp of the Tweets being received to the time on your
 computer. If the times are drifting further apart you are falling behind.

 The most common reasons for falling behind are:
 1. You are attempting to process the stream in the same code that consumes
 them - instead of running a queuing system.
 2. Your connection is being used by other processes reducing your available
 bandwidth.

 As Tom suggested, run through the Streaming Documentation linked to from
 http://dev.twitter.com/pages/streaming_api and make sure you implement the
 suggestions.

 Best,
 @themattharris
 Developer Advocate, Twitter
 http://twitter.com/themattharris


 On Fri, Dec 17, 2010 at 8:52 AM, Dan Checkoway dchecko...@gmail.comwrote:

 Our app is using twitter4j 2.1.9-SNAPSHOT against the twitter firehose,
 and lately we are having problems with the stream just ending out of the
 blue.  It happens several times a day lately with no rhyme or reason.
 Here's an example of what we see:

 Stream closed.TwitterException{exceptionCode=[a3652dee-000a1c7a
 a3652dee-000a1c35], statusCode=-1, retryAfter=0, rateLimitStatus=null,
 version=2.1.9-SNAPSHOT}
 at
 twitter4j.AbstractStreamImplementation.handleNextElement(AbstractStreamImplementation.java:149)
 at twitter4j.StatusStreamImpl.next(StatusStreamImpl.java:74)
 at
 twitter4j.TwitterStream$TwitterStreamConsumer.run(TwitterStream.java:687)
 Caused by: java.io.IOException: the end of the stream has been reached
 at
 twitter4j.AbstractStreamImplementation.handleNextElement(AbstractStreamImplementation.java:80)
 ... 2 more

 We call cleanUp and then reconnect to the firehose, and then the same
 thing happens again.  Eventually we get temporarily rate limited due to the
 reconnect attempts.

 I'm wondering if anybody else out there has seen this issue on the
 firehose, or if anybody has a suggestion on how to avoid or work around it?
 Is the likely cause on twitter's side, or could something on the client side
 be causing this?

 Thanks,
 Dan

 --
 Twitter developer documentation and resources: http://dev.twitter.com/doc
 API updates via Twitter: http://twitter.com/twitterapi
 Issues/Enhancements Tracker:
 http://code.google.com/p/twitter-api/issues/list
 Change your membership to this group:
 http://groups.google.com/group/twitter-development-talk


  --
 Twitter developer documentation and resources: http://dev.twitter.com/doc
 API updates via Twitter: http://twitter.com/twitterapi
 Issues/Enhancements Tracker:
 http://code.google.com/p/twitter-api/issues/list
 Change your membership to this group:
 http://groups.google.com/group/twitter-development-talk


-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


Re: [twitter-dev] 4294967295

2010-12-17 Thread Dan Checkoway
Check this out...today sometime between 4:01:43 AM PST and 4:01:53 AM PST
(sorry for the ambiguity, those are our every 10 sec logging timestamps
for other stuff), we saw the unsigned equivalent of -2 (4294967294) being
sent by twitter in user.listed_count...

Exception in thread Twitter Stream Handling Thread[Receiving stream]
java.lang
.NumberFormatException: For input string: 4294967294
at
java.lang.NumberFormatException.forInputString(NumberFormatException.
java:48)
at java.lang.Integer.parseInt(Integer.java:459)
at java.lang.Integer.valueOf(Integer.java:553)
at twitter4j.internal.util.ParseUtil.getInt(ParseUtil.java:120)
at twitter4j.UserJSONImpl.init(UserJSONImpl.java:103)
at twitter4j.UserJSONImpl.init(UserJSONImpl.java:86)
at twitter4j.StatusJSONImpl.init(StatusJSONImpl.java:101)
at twitter4j.StatusJSONImpl.init(StatusJSONImpl.java:84)
at twitter4j.StatusJSONImpl.init(StatusJSONImpl.java:118)
at twitter4j.StatusJSONImpl.init(StatusJSONImpl.java:84)
at
twitter4j.StatusStreamImpl.handleNextElement(StatusStreamImpl.java:116)
at twitter4j.StatusStreamImpl.next(StatusStreamImpl.java:89)
at
twitter4j.TwitterStream$StreamHandlingThread.run(TwitterStream.java:529)

Any idea what's going on and/or when it might be fixed?

Thanks,
Dan

On Tue, Dec 14, 2010 at 8:10 PM, Taylor Singletary 
taylorsinglet...@twitter.com wrote:

 Thanks! This is being looked into. I'll update when I have news.

 Taylor

 On Tuesday, December 14, 2010, Dan Checkoway dchecko...@gmail.com wrote:
  Yeah, you bet.  Twitter4j isn't logging a timestamp when it happens, but
 here are a handful of timestamps for unrelated stuff that got logged no more
 than 10 seconds *prior* to the 4294967295 error popping out...so they're
 fairly close:
 
  Dec 14, 2010 12:34:11 PM PST
  Dec 14, 2010 1:13:07 PM PST
  Dec 14, 2010 1:22:48 PM PST
  Dec 14, 2010 1:27:22 PM PST
  Dec 14, 2010 1:29:48 PM PST
  Dec 14, 2010 1:33:36 PM PST
 
  Based on the twitter4j stack trace, I can tell you that it was *always*
 user.listed_count that had the funky value:
 
  Exception in thread Twitter Stream Handling Thread[Receiving stream]
 java.lang
  .NumberFormatException: For input string: 4294967295
  at
 java.lang.NumberFormatException.forInputString(NumberFormatException.
  java:48)
  at java.lang.Integer.parseInt(Integer.java:459)
  at java.lang.Integer.valueOf(Integer.java:553)
  at twitter4j.internal.util.ParseUtil.getInt(ParseUtil.java:120)
  at twitter4j.UserJSONImpl.init(UserJSONImpl.java:103)
 
  Thanks,
  Dan
 
  On Tue, Dec 14, 2010 at 6:42 PM, Taylor Singletary 
 taylorsinglet...@twitter.com wrote:
  Understandable, Dan.
 
  Can you tell me the last time an event like this happened?
 
  Taylor
 
  On Tue, Dec 14, 2010 at 3:41 PM, Dan Checkoway dchecko...@gmail.com
 wrote:
  I know this is the weenie answer, but I haven't been able to track a
  specific offending JSON object down yet, since it only seems to happen
 on
  the firehose, and we're using twitter4j to process that.
 
  If we were able to connect to the firehose more than once at a time, I
 could
  easily write a tool to detect and highlight the issue.  Short of that,
 I'll
  try watching the sample stream for a while to see if the same issue pops
 up
  there.  Will report any findings...
 
  Thanks,
  Dan
 
  On Tue, Dec 14, 2010 at 6:19 PM, Taylor Singletary
  taylorsinglet...@twitter.com wrote:
 
  Hi Dan,
 
  Do you continue to see events like this happening? Can you provide a
  recent example in as-provided JSON or XML?
 
  Thanks,
  Taylor
 
  On Tue, Dec 14, 2010 at 2:13 PM, Dan Checkoway dchecko...@gmail.com
  wrote:
   Anybody else seeing user.listed_count occasionally coming back as
   4294967295?  That value just happens to equate to:  1 + (2 *
   Integer.MAX_VALUE)  Sure looks like an unsigned version of -1 to
 me...
  
   Anyway, it's breaking twitter4j.TwitterStream stuff.  I've mentioned
   that
   separately on the twitter4j list, but I wanted to raise the issue
 here
   since
   the root cause is twitter sending the weird value.
  
   Thanks,
   Dan
  
   --
   Twitter developer documentation and resources:
   http://dev.twitter.com/doc
   API updates via Twitter: http://twitter.com/twitterapi
   Issues/Enhancements Tracker:
   http://code.google.com/p/twitter-api/issues/list
   Change your membership to this group:
   http://groups.google.com/group/twitter-development-talk
  
 
  --
  Twitter developer documentation and resources:
 http://dev.twitter.com/doc
  API updates via Twitter: http://twitter.com/twitterapi
  Issues/Enhancements Tracker:
  http://code.google.com/p/twitter-api/issues/list
  Change your membership to this group:
  http://groups.google.com/group/twitter-development-talk
 
  --
  Twitter developer documentation and resources:
 http://dev.twitter.com/doc
  API updates via Twitter: http://twitter.com/twitterapi

[twitter-dev] firehose exception: the end of stream has been reached

2010-12-17 Thread Dan Checkoway
Our app is using twitter4j 2.1.9-SNAPSHOT against the twitter firehose, and
lately we are having problems with the stream just ending out of the
blue.  It happens several times a day lately with no rhyme or reason.
Here's an example of what we see:

Stream closed.TwitterException{exceptionCode=[a3652dee-000a1c7a
a3652dee-000a1c35], statusCode=-1, retryAfter=0, rateLimitStatus=null,
version=2.1.9-SNAPSHOT}
at
twitter4j.AbstractStreamImplementation.handleNextElement(AbstractStreamImplementation.java:149)
at twitter4j.StatusStreamImpl.next(StatusStreamImpl.java:74)
at
twitter4j.TwitterStream$TwitterStreamConsumer.run(TwitterStream.java:687)
Caused by: java.io.IOException: the end of the stream has been reached
at
twitter4j.AbstractStreamImplementation.handleNextElement(AbstractStreamImplementation.java:80)
... 2 more

We call cleanUp and then reconnect to the firehose, and then the same thing
happens again.  Eventually we get temporarily rate limited due to the
reconnect attempts.

I'm wondering if anybody else out there has seen this issue on the firehose,
or if anybody has a suggestion on how to avoid or work around it?  Is the
likely cause on twitter's side, or could something on the client side be
causing this?

Thanks,
Dan

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


[twitter-dev] 4294967295

2010-12-14 Thread Dan Checkoway
Anybody else seeing user.listed_count occasionally coming back as
4294967295?  That value just happens to equate to:  1 + (2 *
Integer.MAX_VALUE)  Sure looks like an unsigned version of -1 to me...

Anyway, it's breaking twitter4j.TwitterStream stuff.  I've mentioned that
separately on the twitter4j list, but I wanted to raise the issue here since
the root cause is twitter sending the weird value.

Thanks,
Dan

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


Re: [twitter-dev] 4294967295

2010-12-14 Thread Dan Checkoway
Yeah, you bet.  Twitter4j isn't logging a timestamp when it happens, but
here are a handful of timestamps for unrelated stuff that got logged no more
than 10 seconds *prior* to the 4294967295 error popping out...so they're
fairly close:

Dec 14, 2010 12:34:11 PM PST
Dec 14, 2010 1:13:07 PM PST
Dec 14, 2010 1:22:48 PM PST
Dec 14, 2010 1:27:22 PM PST
Dec 14, 2010 1:29:48 PM PST
Dec 14, 2010 1:33:36 PM PST

Based on the twitter4j stack trace, I can tell you that it was *always*
user.listed_count that had the funky value:

Exception in thread Twitter Stream Handling Thread[Receiving stream]
java.lang
.NumberFormatException: For input string: 4294967295
at
java.lang.NumberFormatException.forInputString(NumberFormatException.
java:48)
at java.lang.Integer.parseInt(Integer.java:459)
at java.lang.Integer.valueOf(Integer.java:553)
at twitter4j.internal.util.ParseUtil.getInt(ParseUtil.java:120)
at twitter4j.UserJSONImpl.init(UserJSONImpl.java:103)

Thanks,
Dan

On Tue, Dec 14, 2010 at 6:42 PM, Taylor Singletary 
taylorsinglet...@twitter.com wrote:

 Understandable, Dan.

 Can you tell me the last time an event like this happened?

 Taylor

 On Tue, Dec 14, 2010 at 3:41 PM, Dan Checkoway dchecko...@gmail.com
 wrote:
  I know this is the weenie answer, but I haven't been able to track a
  specific offending JSON object down yet, since it only seems to happen on
  the firehose, and we're using twitter4j to process that.
 
  If we were able to connect to the firehose more than once at a time, I
 could
  easily write a tool to detect and highlight the issue.  Short of that,
 I'll
  try watching the sample stream for a while to see if the same issue pops
 up
  there.  Will report any findings...
 
  Thanks,
  Dan
 
  On Tue, Dec 14, 2010 at 6:19 PM, Taylor Singletary
  taylorsinglet...@twitter.com wrote:
 
  Hi Dan,
 
  Do you continue to see events like this happening? Can you provide a
  recent example in as-provided JSON or XML?
 
  Thanks,
  Taylor
 
  On Tue, Dec 14, 2010 at 2:13 PM, Dan Checkoway dchecko...@gmail.com
  wrote:
   Anybody else seeing user.listed_count occasionally coming back as
   4294967295?  That value just happens to equate to:  1 + (2 *
   Integer.MAX_VALUE)  Sure looks like an unsigned version of -1 to me...
  
   Anyway, it's breaking twitter4j.TwitterStream stuff.  I've mentioned
   that
   separately on the twitter4j list, but I wanted to raise the issue here
   since
   the root cause is twitter sending the weird value.
  
   Thanks,
   Dan
  
   --
   Twitter developer documentation and resources:
   http://dev.twitter.com/doc
   API updates via Twitter: http://twitter.com/twitterapi
   Issues/Enhancements Tracker:
   http://code.google.com/p/twitter-api/issues/list
   Change your membership to this group:
   http://groups.google.com/group/twitter-development-talk
  
 
  --
  Twitter developer documentation and resources:
 http://dev.twitter.com/doc
  API updates via Twitter: http://twitter.com/twitterapi
  Issues/Enhancements Tracker:
  http://code.google.com/p/twitter-api/issues/list
  Change your membership to this group:
  http://groups.google.com/group/twitter-development-talk
 
  --
  Twitter developer documentation and resources:
 http://dev.twitter.com/doc
  API updates via Twitter: http://twitter.com/twitterapi
  Issues/Enhancements Tracker:
  http://code.google.com/p/twitter-api/issues/list
  Change your membership to this group:
  http://groups.google.com/group/twitter-development-talk
 

 --
 Twitter developer documentation and resources: http://dev.twitter.com/doc
 API updates via Twitter: http://twitter.com/twitterapi
 Issues/Enhancements Tracker:
 http://code.google.com/p/twitter-api/issues/list
 Change your membership to this group:
 http://groups.google.com/group/twitter-development-talk


-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


[twitter-dev] Company Whitelisting

2010-11-17 Thread Dan
Hi - I work at Qwest Communications and all access to the public
internet for our 40K + employees goes through a small number of proxy
servers.  So when attempting to access rate-limited resources, we are
already at our limit most of the time.  As part of our website I'm
trying to include a rate-limited resource(RSS) for one of our lists,
and in the past several days I've only been able to successfully
access the RSS about 3 times.  For performance reasons - we'd prefer
to cache our RSS server side rather than connecting client side (where
rate limiting would likely not apply for external clients).  Is there
anyway I can get our whole company whitelisted for a much larger
request limit?
You may think we can use a non rate limited resource like the filter
api or something for my specific needs - but that still leaves us the
problem that we cannot access our own RSS or any other RSS from
anywhere inside the Qwest Intranet without a HTTP400 95% of the time.

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


[twitter-dev] Re: Twitter streaming API using oauth with tracks that have spaces?

2010-11-12 Thread dan
Taylor,

Thanks for your response. The crux might be

 Normalizing spaces to %20, and avoiding + is also a best practice.

tweetstream4j uses Apache's HttpClient 4.0 (see
http://hc.apache.org/httpcomponents-client-ga/index.html). I believe
if a request has application/x-www-form-urlencoded params, HttpClient
URL-encodes (i.e. space = +), and one can't percent-encode beforehand
because the param will be double-encoded, e.g. foo%20bar = foo
%2520bar instead of foo bar. One also can't avoid the HttpClient URL
encoding by using a different type of param, because then the params
are not labeled application/x-www-form-urlencoded.

I wouldn't be surprised if twitter4j and tweepy were in a similar sort
of bind, though I have not verified.

Can you elaborate on why avoiding + is so important? I would hate to
have to patch Apache's HttpClient.

Also, do you know of any Java or Python library that gets this right?


On Nov 10, 8:56 am, Taylor Singletary taylorsinglet...@twitter.com
wrote:
 Think of it this way.. a valid POST body already must contain
 application/x-www-form-urlencoded encoded values for the body to be valid.
 Normalizing spaces to %20, and avoiding + is also a best practice. OAuth
 kicks in after you've already constructed a valid POST body.

 Here's an example of tracking a term with a space character in it: twitter
 api

 == POST Body
 track=twitter%20api

 == signature_base_string
 POSThttp%3A%2F%2Fstream.twitter.com
 %2F1%2Fstatuses%2Ffilter.jsonoauth_consumer_key%3Dri8JxYK2ddwSV5xIUfNNvQ%26oauth_nonce%3DQKWqIP8eEedgOPk5ujopscNxqeoafDNC0r6TZyLFM%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1289400791%26oauth_token%3D819797-torCkTs0XK7H2Y2i1ee5iofqkMC4p7aayeEXRTmlw%26oauth_version%3D1.0%26track%3Dtwitter%2520api

 == Authorization Header
 Authorization: OAuth
 oauth_nonce=QKWqIP8eEedgOPk5ujopscNxqeoafDNC0r6TZyLFM,
 oauth_signature_method=HMAC-SHA1, oauth_timestamp=1289400791,
 oauth_consumer_key=ri8JxYK2ddwSV5xIUfNNvQ,
 oauth_token=819797-torCkTs0XK7H2Y2i1ee5iofqkMC4p7aayeEXRTmlw,
 oauth_signature=jaEvelmcrQOkHdWADBvwZsQeGiQ%3D, oauth_version=1.0

 Taylor

 On Wed, Nov 10, 2010 at 1:38 AM, Ciaran ciar...@gmail.com wrote:
  Try ui-encoding them first, my understanding of the Twitter OAuth
  signature validation is that it is non-standard (although there
  appears to be debate about this) I suspect if you encode them first
  before signing the url it will start to work
  -cj.

  On Tue, Nov 9, 2010 at 6:11 PM, dan dfran...@gmail.com wrote:
   I've been having trouble connecting to the streaming API using oauth
   if my tracks have spaces. I get 401s (unauthorized). In all cases, the
   same code works if the tracks don't have spaces.

   In Java: tried twitter4j (http://twitter4j.org/jira/browse/TFJ-420)
   and tweetstream4j (http://stackoverflow.com/questions/4129622/
   connecting-to-twitter-streaming-api-with-tracks-with-spaces-using-
   apache-httpclie)

   In Python: tried tweepy (https://github.com/joshthecoder/tweepy/
   issues#issue/64)

   The Twitter example using curl (http://dev.twitter.com/pages/
   streaming_api_methods#track) works with tracks that have spaces, but
   it's basic auth.

   I am wondering if some oauth encoding versus POST param encoding is
   not working out.

   Can someone point me to a code example in Java or Python that is known
   to work connecting to the Twitter streaming API using oauth that has
   spaces in its tracks?

   Thanks in advance.

   --
   Twitter developer documentation and resources:
 http://dev.twitter.com/doc
   API updates via Twitter:http://twitter.com/twitterapi
   Issues/Enhancements Tracker:
 http://code.google.com/p/twitter-api/issues/list
   Change your membership to this group:
 http://groups.google.com/group/twitter-development-talk

  --
  Twitter developer documentation and resources:http://dev.twitter.com/doc
  API updates via Twitter:http://twitter.com/twitterapi
  Issues/Enhancements Tracker:
 http://code.google.com/p/twitter-api/issues/list
  Change your membership to this group:
 http://groups.google.com/group/twitter-development-talk

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


[twitter-dev] Twitter streaming API using oauth with tracks that have spaces?

2010-11-09 Thread dan
I've been having trouble connecting to the streaming API using oauth
if my tracks have spaces. I get 401s (unauthorized). In all cases, the
same code works if the tracks don't have spaces.

In Java: tried twitter4j (http://twitter4j.org/jira/browse/TFJ-420)
and tweetstream4j (http://stackoverflow.com/questions/4129622/
connecting-to-twitter-streaming-api-with-tracks-with-spaces-using-
apache-httpclie)

In Python: tried tweepy (https://github.com/joshthecoder/tweepy/
issues#issue/64)

The Twitter example using curl (http://dev.twitter.com/pages/
streaming_api_methods#track) works with tracks that have spaces, but
it's basic auth.

I am wondering if some oauth encoding versus POST param encoding is
not working out.

Can someone point me to a code example in Java or Python that is known
to work connecting to the Twitter streaming API using oauth that has
spaces in its tracks?

Thanks in advance.

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


Re: [twitter-dev] Re: Snowflake: An update and some very important information

2010-10-19 Thread Dan Checkoway
I'm also patiently awaiting a response from twitter about this.  Are the ids
sane for 64-bit *signed* long?

Dan

On Mon, Oct 18, 2010 at 9:08 PM, jon jonhoff...@gmail.com wrote:

 Hi,

 You wrote that the IDs are unsigned 64 bit ints, but the IdWorker is
 pumping out java Longs which are signed.  I'm assuming that was a
 typo, but please clarify.


 http://github.com/twitter/snowflake/blob/master/src/main/scala/com/twitter/service/snowflake/IdWorker.scala

 Thanks,

 - Jon

 On Oct 18, 8:19 pm, Matt Harris thematthar...@twitter.com wrote:
  Last week you may remember Twitter planned to enable the new Status ID
  generator - 'Snowflake' but didn't. The purpose of this email is to
 explain
  the reason why this didn't happen, what we are doing about it, and what
 the
  new release plan is.
 
  So what is Snowflake?
  --
  Snowflake is a service we will be using to generate unique Tweet IDs.
 These
  Tweet IDs are unique 64bit unsigned integers, which, instead of being
  sequential like the current IDs, are based on time. The full ID is
 composed
  of a timestamp, a worker number, and a sequence number.
 
  The problem
  -
  Before launch it came to our attention that some programming languages
 such
  as Javascript cannot support numbers with 53bits. This can be easily
  examined by running a command similar to: (90071992547409921).toString()
 in
  your browsers console or by running the following JSON snippet through
 your
  JSON parser.
 
  {id: 10765432100123456789, id_str: 10765432100123456789}
 
  In affected JSON parsers the ID will not be converted successfully and
 will
  lose accuracy. In some parsers there may even be an exception.
 
  The solution
  
  To allow javascript and JSON parsers to read the IDs we need to include a
  string version of any ID when responding in the JSON format. What this
 means
  is Status, User, Direct Message and Saved Search IDs in the Twitter API
 will
  now be returned as an integer and a string in JSON responses. This will
  apply to the main Twitter API, the Streaming API and the Search API.
 
  For example, a status object will now contain an id and an id_str. The
  following JSON representation of a status object shows the two versions
 of
  the ID fields for each data point.
 
  [
{
  coordinates: null,
  truncated: false,
  created_at: Thu Oct 14 22:20:15 + 2010,
  favorited: false,
  entities: {
urls: [
],
hashtags: [
],
user_mentions: [
  {
name: Matt Harris,
id: 777925,
id_str: 777925,
indices: [
  0,
  14
],
screen_name: themattharris
  }
]
  },
  text: @themattharris hey how are things?,
  annotations: null,
  contributors: [
{
  id: 819797,
  id_str: 819797,
  screen_name: episod
}
  ],
  id: 12738165059,
  id_str: 12738165059,
  retweet_count: 0,
  geo: null,
  retweeted: false,
  in_reply_to_user_id: 777925,
  in_reply_to_user_id_str: 777925,
  in_reply_to_screen_name: themattharris,
  user: {
id: 6253282
id_str: 6253282
  },
  source: web,
  place: null,
  in_reply_to_status_id: 12738040524
  in_reply_to_status_id_str: 12738040524
}
  ]
 
  What should you do - RIGHT NOW
  --
  The first thing you should do is attempt to decode the JSON snippet above
  using your production code parser. Observe the output to confirm the ID
 has
  not lost accuracy.
 
  What you do next depends on what happens:
 
  * If your code converts the ID successfully without losing accuracy you
 are
  OK but should consider converting to the _str versions of IDs as soon as
  possible.
  * If your code has lost accuracy, convert your code to using the _str
  version immediately. If you do not do this your code will be unable to
  interact with the Twitter API reliably.
  * In some language parsers, the JSON may throw an exception when reading
 the
  ID value. If this happens in your parser you will need to ‘pre-parse’ the
  data, removing or replacing ID parameters with their _str versions.
 
  Summary
  -
  1) If you develop in Javascript, know that you will have to update your
 code
  to read the string version instead of the integer version.
 
  2) If you use a JSON decoder, validate that the example JSON, above,
 decodes
  without throwing exceptions. If exceptions are thrown, you will need to
  pre-parse the data. Please let us know the name, version, and language of
  the parser which throws the exception so we can investigate.
 
  Timeline
  ---
  by 22nd October 2010 (Friday): String versions of ID numbers will start
  appearing in the API responses
  4th November 2010 (Thursday) : Snowflake will be turned on but at ~41bit

[twitter-dev] Search API - Show From user but not @replies

2010-09-23 Thread Dan
Is it possible using a search query to show tweets from a user but not
include their @ replies?

I can see that it's possible to negate a query (such as @user) but not
possible to use a wildcard (to negate all @users) so how could you do
this?

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


[twitter-dev] Create a favorite

2010-09-05 Thread Dan
Im very much a newbie to PHP and the Twitter API.

Im trying to create a form button to set a tweet as a favorite.

I have OAuth working to post status updates and i've tried to amend
the status update code to set a tweet to be a favorite.

Wonder if anyone could help me:

$qtweet = A Twitter ID

if(isset($_POST['submit'])) {
$qtweet = $_REQUEST['fav'];
$connection-post('favorites/create', array('id' = $qtweet));
echo div style='padding-bottom: 5px; color: #0099FF;'Favorite
Created./div;
}

form id=fav method='post' action='index.php'
input style=width: 346px; name=fav id=fav /textarea
input type='submit' value='Tweet This!' name='submit' id='submit' /
/form

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk?hl=en


[twitter-dev] Lat,long, vs long/lat

2010-08-13 Thread Dan
Why is it that in most of the API, geo-co-ordinates are represented as
lat,long?

e.g. http://api.twitter.com/1/statuses/show/21059379505.json

...geo:{type:Point,coordinates:[44.6994873,-73.4529124]}...
(like most of the world does it)

but in the places API it is long,lat?

e.g.

http://api.twitter.com/1/geo/id/881e03b2b43d3810.json

{geometry:{type:Point,coordinates:[-73.452852,44.698943]}...

This is very confusing!

Cheers

Dan


[twitter-dev] Using Search API to get a list of replies to specific tweet

2010-07-31 Thread Dan
Hello everyone,

I was wondering if it is possible to use the Search API to get a list
of tweets that are in reply to a specific tweet. For example, is there
any way to send a tweet ID to the Search API, and then retrieve all
tweets that are in reply to this specific ID?

Thank you.


[twitter-dev] Do i need to create an app

2010-05-27 Thread dan nenws
Hi all really sorry about bothering you with this, i just have a quick
question to ask.

i currently have a CMS that i have coded from scratch within this i
have included a twitter intergration so when one of our people using
the CMS adds an article it will post it directly to our twitter
profile, it currently doing this via a PHP class that i had found,
using the username and password directly to post to twitter.

the question is would i have to change this to OAuth, and would i need
to create an application for it? as it isnt really an application as
such is it? im kind of lost with this, should i create an app and then
recode the way the CMS works to post to twitter using OAuth? im
assuming i would need to create a callback page etc to get the
authorization details that i would need is this correct?

any help would be most appreciated

thanks
Dan


[twitter-dev] direct_message/new to multiple users

2010-05-19 Thread Dan
is it possible to DM multiple user ids by specifying comma separated
user_id parameter? e.g. user_id=123,125,234,345 etc etc?


[twitter-dev] Re: direct_message/new to multiple users

2010-05-19 Thread Dan
thanks for the info. I just wanted to check :)

On May 19, 4:24 pm, Taylor Singletary taylorsinglet...@twitter.com
wrote:
 Hi Dan,

 This is not possible. DMs really aren't meant as a platform for sending the
 same message to multiple users.

 Taylor Singletary
 Developer Advocate, Twitterhttp://twitter.com/episod

 On Wed, May 19, 2010 at 7:32 AM, Dan d...@danielprocter.com wrote:
  is it possible to DM multiple user ids by specifying comma separated
  user_id parameter? e.g. user_id=123,125,234,345 etc etc?


Re: [twitter-dev] Re: alert() in anywhere.js

2010-05-19 Thread Dan Webb
On Wed, May 19, 2010 at 11:27 AM, Steve C st...@twitpic.com wrote:
 We just rolled out @anywhere yesterday and some of our users are
 experiencing similar issues.

 http://twitpic.com/1p00d6

We rolled out a fix at the weekend that we fixed all the browsers that
we test under but there are obviously still some browsers getting the
issue.  I think we'll use console.info to display these message
instead of an alert.  We wanted to let developers know that they
needed a clientID in the most noticable way but to avoid unintended
annoyance of users we'll move to console.log.

Thanks,

-- 
Dan Webb
Front-end Engineer, Platform
d...@twitter.com / @danwrong
+1 415 425 5631


Re: [twitter-dev] Re: alert() in anywhere.js

2010-05-19 Thread Dan Webb
On Wed, May 19, 2010 at 11:48 AM, Damon Clinkscales sca...@pobox.com wrote:
 On Wed, May 19, 2010 at 1:41 PM, Dan Webb d...@twitter.com wrote:
 On Wed, May 19, 2010 at 11:27 AM, Steve C st...@twitpic.com wrote:

 Just wondering...does TwitPic have a bug or misconfiguration or is
 this an @anywhere bug?

Javascript errors at startup time (in these cases by browser bugs in
certain browsers that we don't support) are causing the initialization
to terminate early leaving the client ID unset.  We're going to ensure
that unsupport browsers fail silently rather than triggering this
alert.

ETA for fix is within the hour.

-- 
Dan Webb
Front-end Engineer, Platform
d...@twitter.com / @danwrong
+1 415 425 5631


Re: [twitter-dev] Re: alert() in anywhere.js

2010-05-16 Thread Dan Webb
This does sound like a regression of some kind.  We'll get this fixed ASAP.

On Sat, May 15, 2010 at 3:41 PM, JohnB johnfakor...@yahoo.com wrote:

 Are we really talking about incorrect installations here? Twitter's
 own @Anywhere documentation page (http://dev.twitter.com/anywhere/
 begin) is throwing this same error in older browsers, including Chrome
 3.0.195.


-- 
Dan Webb
Front-end Engineer, Platform
d...@twitter.com / @danwrong
+1 415 425 5631


Re: [twitter-dev] @anywhere in Safari4/Mac - wont work

2010-05-13 Thread Dan Webb
It looks to me like your hovercards are not finding a screen name
rather than it being a browser issue.  The Unsafe javascript attempt
is a warning and does not effect operation.

On Wed, May 12, 2010 at 8:17 AM, Felix Kunsmann fe...@kunsmann.eu wrote:
 Hello,

 I'm trying to use @anywhere hovercards in my Blog (Link below). It seems that 
 Safari is blocking all requests to Twitter, so is there a way to fix that (or 
 to duplicate hovercard functionality)?


-- 
Dan Webb
Front-end Engineer, Platform
d...@twitter.com / @danwrong
+1 415 425 5631


Re: [twitter-dev] Re: Verify user connect with @anywhere?

2010-05-13 Thread Dan Webb
Shortly we'll be providing the logged in user's id along with a
signature that will allow you to verify it is genuine.  Stay tuned.

On Wed, May 12, 2010 at 6:14 PM, Abraham Williams 4bra...@gmail.com wrote:
 I don't think it is officially supported as a public API but you can pull
 the twttr_anywhere cookie which contains an access token.
 https://api.twitter.com/1/account/verify_credentials.xml?oauth_access_token=xyz
 Abraham



-- 
Dan Webb
Front-end Engineer, Platform
d...@twitter.com / @danwrong
+1 415 425 5631


[twitter-dev] GET list memberships paging is broken?

2010-04-17 Thread Dan Checkoway
When using the GET list memberships API (
http://api.twitter.com/1/twitterapi/lists/memberships.*), it looks like
paging is broken.  If the user is a member of 20 lists, you can never see
anything beyond the first 20.  I'm passing cursor=-1 (well, twitter4j is) on
the first request, and I get back the first page of 20 lists, which is
fine...but no matter what, I always get back:

next_cursor:0, previous_cursor:0, next_cursor_str:0,
previous_cursor_str:0

...which prevents any paging beyond that first page of 20.  This is the case
no matter which user I've tried.

What seems coincidental is that even on the twitter web site proper, only
the first page of 20 is presented as well, with no way to page beyond
that...for example:  http://twitter.com/GamePro/lists/memberships  I'm not
sure if that's a related issue, or an intentional thing that has also
affected the API, or what.

Anyway, can twitter please fix paging on the GET list memberships API?

Thanks,
Dan Checkoway


-- 
Subscription settings: 
http://groups.google.com/group/twitter-development-talk/subscribe?hl=en


Re: [twitter-dev] Re: Mad about lists and cursors... please help

2010-04-17 Thread Dan Checkoway
+1 on needing this fix.  Sorry for the duplicate report of this issue I
slapped in another thread this morning.

Thanks,
Dan


On Sat, Apr 17, 2010 at 12:04 PM, Mark McBride mmcbr...@twitter.com wrote:

 Yes.  A fix has been identified, and should be deployed in a few days

 Sent from mobile device


 On Apr 17, 2010, at 7:08 AM, Zach zcox...@gmail.com wrote:

  It's 10 days later and next_cursor on
 http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-GET-list-memberships
 is still always 0, even when the user is being followed by far more
 than 20 lists.  This is completely broken and prevents 3rd party apps
 from discovering all lists that follow a given user.

 Has anyone at Twitter even looked into this?


 On Apr 7, 3:43 pm, Mark McBride mmcbr...@twitter.com wrote:

 Eugene, we're aware of the issue and will take a look at it today.

  ---Mark

 http://twitter.com/mccv

 On Wed, Apr 7, 2010 at 11:09 AM, eugene.man...@gmail.com 

 eugene.man...@gmail.com wrote:

 I posted this issue to @twitterapi twice, but they ignored it.


  Dear API group, please address this question.


  Thank you!


  On Apr 6, 9:45 am, Spraycode joey.fernan...@gmail.com wrote:

 Has anyone been able to solve this issue?  This is still crippling us.


  Thanks!


  On Apr 2, 5:25 am, luisfigo rsoeg...@gmail.com wrote:


  Having the same problem...


  Triedhttp://api.twitter.com/1/avinashkaushik/lists/memberships.xml
 and get 0 for cursor. This guy is followed by ton of lists in fact


  Below is the snapshot of the end result I got... This is screwing up
 our app right now...


  .
 profile_background_image_url

 http://a1.twimg.com/profile_background_images/79104366/twitter_backgr.
 ..

 /profile_background_image_url
 profile_background_tilefalse/profile_background_tile
 notificationsfalse/notifications
 geo_enabledfalse/geo_enabled
 verifiedfalse/verified
 followingfalse/following
 statuses_count3208/statuses_count
 langen/lang
 contributors_enabledfalse/contributors_enabled
 /user
 /list
 /lists
 next_cursor0/next_cursor
 previous_cursor0/previous_cursor
 /lists_list


  On Apr 1, 6:00 pm, Diego Rin Martin diego@gmail.com wrote:


  I think it's a API bug, even in the twitter page the paginator

 doesn't work

 as expected, sometimes
 appears, sometines not, and when appears it makes in a random manner.


  i'm getting cursor 0 from API, using int or string representation,

 the bug

 is in the API that sends
 the cursor 0 randomly.


  regards, diego.


  On Thu, Apr 1, 2010 at 2:38 AM, jmathai jmat...@gmail.com wrote:

 Are you sure you're using the string representation of the cursor
 instead of the int?  The API's cursor exceeds PHP's max integer

 value

 (generally).


  jmathai ~ $ php -r '$x =
 json_decode(1);
 echo $x; echo \n;


  var_dump($x===1);

 var_dump($x===1.111E+52);'
 1.111E+52
 bool(false)
 bool(true)


  jmathai ~ $ php -r '$x =
 1; echo $x;

 echo

 \n;


  var_dump($x===1);

 var_dump($x===1.111E+52);'
 1.111E+52
 bool(true)
 bool(false)


  On Mar 31, 2:03 am, Diego Rin Martín diego@gmail.com wrote:

 Hi there,


  this is my first post to this group, i'm a spanish developer

 dealing

 with twitter api surprises, excuse my poor english, i'will do my

 best

 to comunicate nicest.


  So, to the problem, I'm trying to retrieve the lists for a user,

 via

 list/membershipsget method, and passing cursor as parameter, I'm
 having got random results, I explain myself, sometimes I made a
 request (for user edans, that have a huge amount of pages to

 paginate)

 and I get one page, I pass cursor -1 and I get cursor 0,

 sometimes I

 get one page, I pass cursor -1 i get cursor 1331431515904087602,

 then

 I pass it and I get 0, sometimes I get a random number of pages,

 but

 never, never, be able to retrieve the total amount of pages.


  I use php twitter-async classes to comunicate with API, I thought

 that

 it could be the cause of the problem, but using direct curl (via

 php5-

 curl extension) calls I'm having the same issues.


  Same using json or xml.


  I'm always getting 200 responses, so the call finish in a correct

 way.


  any clue?


  I'm turning mad.


  Thanks in advance.
 diego.


  --
 To unsubscribe, reply using remove me as the subject.




Re: [twitter-dev] jQuery being loaded multiple times using @anywhere

2010-04-16 Thread Dan Webb
Hi Matt,

At the moment there are 2 references to jQuery.  We'd rather load in
our own version of JQuery rather than detecting it in partner pages so
we can be assured of the version we are running on top of.  The reason
its loaded twice is that it's used both on the client and on the
server that exists in a hidden iframe.  A large amount of users will
have google's jQuery cached so it doesn't slow performance too much.
That being said we will continue to tune @anywhere and removing
external dependencies will be something we'll definitely be looking
at.

Thanks,

Dan

On Fri, Apr 16, 2010 at 8:49 AM, Matt m...@indielabs.com wrote:
 We've just implemented @anywhere's hovercard feature on our website
 and noticed that in addition to the initial loading of jQuery from
 Google which we were already doing, by including the Twitter script it
 loads jQuery 2 or 3 more times from Google. This should be fixed to
 only load jQuery once if it is not already detected.

 Here is the script we're using:

 script src=http://platform.twitter.com/anywhere.js?
 id=OURAPIKEYISHEREv=1/script
 script type=text/javascript
 twttr.anywhere(function(twitter) {
  twitter('.twitter a').hovercards({
    infer: true
  });
 });
 /script


 --
 Subscription settings: 
 http://groups.google.com/group/twitter-development-talk/subscribe?hl=en




-- 
Dan Webb
Front-end Engineer, Web Client
d...@twitter.com / @danwrong
+1 415 425 5631


Re: [twitter-dev] Re: parent.twttr.anywhere._signedOutCookiePresent

2010-04-16 Thread Dan Webb
Apologies for this.  There was an issue with our CDN causing this
which we've now fixed.  It's not related to cookies.

Thanks,

Dan

On Fri, Apr 16, 2010 at 2:54 PM, Jon j...@jgubman.com wrote:
 I was getting that same error earlier. Clearing out my cookies seemed
 to fix it, but doesn't instill confidence...

 On Apr 16, 2:25 pm, Craig cbernst...@gmail.com wrote:
 Hello,

 @Anywhere (just a simple install following the Getting Started
 instructions) worked on my site yesterday. Today, it is dead:

 platform0.twitter.com/1/javascripts/client.js:1:

 Uncaught TypeError: Object function (Z,b){if(typeof Z==function)
 {b=Z;Z=twttr.anywhere._config.defaultVersion}if(!
 twttr.anywhere._config.clientID){return alert(To set up @anywhere,
 please provide a client ID)}if(D==callback||D==headless){return }
 var Y;var a=twttr.anywhere._instances;if(typeof Z===string||typeof
 Z===number){Z={version:Z}}Z.version=(Z.version)?
 Z.version.toString():twttr.anywhere._config.defaultVersion;Z=E({window:window},Z);if((Y=a[Z.version]))
 {if(Y.contentWindow._ready){Y.contentWindow._init(b,Z)}
 else{U(Y.contentWindow,b,Z)}}else{T(Z,b)}} has no method
 '_signedOutCookiePresent'

 Oops?
 Craig

 --
 Subscription 
 settings:http://groups.google.com/group/twitter-development-talk/subscribe?hl=en




-- 
Dan Webb
Front-end Engineer, Web Client
d...@twitter.com / @danwrong
+1 415 425 5631


[twitter-dev] Re: @anywhere sign in button disappearing

2010-04-15 Thread Dan Webb
Hi Aral,

So the connect button disappears entirely after you've connected?  If
you reply with steps to reproduce we can look in to it.

Thanks,

Dan

On Apr 15, 8:48 am, Aral Balkan aralbal...@gmail.com wrote:
 Definitely seeing it disappear while logged into a different account. Not
 sure if some oAuth session is being cached or something.

 Aral


-- 
To unsubscribe, reply using remove me as the subject.


[twitter-dev] Re: twitter.User.current.data is not a function

2010-04-15 Thread Dan Webb
The way to acheive this best would be:

twttr.anywhere(function(twitter)
{
  if (twitter.isConnected())
  {
alert(ttwitter.currentUser.data('screen_name'));
  }
  else
  {
twitter(#connectArea).connectButton({size: large});
  }
});

Thanks,

Dan

On Apr 15, 7:46 am, silentgecko rwelb...@brainpool.de wrote:
 Same Problem here

 On 15 Apr., 09:47, Palleas pall...@gmail.com wrote:



  Hi all,

  I gave a try to Anywhere connect, and I have a weird issue, even if
  I'm using the official example provided on the website.
  Here is what I'm doing :

  twttr.anywhere(function(twitter)
  {
    if (twitter.isConnected)
    {
      alert(twitter.User.current.data(screen_name));
    }
    else
    {
      twitter(#connectArea).connectButton({size: large});
    }

  });

  But this is what I got from firefox and Chrome :

  twitter.User.current.data is not a function
  [Break on this error] alert(twitter.User.current.data(screen_name));
  

  Any hints?
  Thanks!


-- 
To unsubscribe, reply using remove me as the subject.


Re: [twitter-dev] Re: Basic Auth Deprecation

2010-04-14 Thread Dan Checkoway
Dean,

Basic auth sends the password essentially in the clear (encoded, but
trivially so).  It's really in everybody's best interest NOT to use basic
auth, but to switch to something less sniffable/repeatable.

For example, here's a sample credential you're passing to twitter (HTTP
header) when you use basic auth:

*Authorization: Basic bm9ib2R5OndoYXRldmVy
*
Go to http://ostermiller.org/calc/encode.html, paste bm9ib2R5OndoYXRldmVy
into the box and click Decode next to Base 64.  Now you have my password.
Sniff some HTTP requests and you've got a whole lot of passwords.
Completely non-secure.  I'm not even sure why basic auth ever gained any
sort of acceptance.

Switching off basic auth and onto something like OAuth, any of your users
who value their privacy will thank you!

1 for deprecating basic auth.

Dan


On Wed, Apr 14, 2010 at 9:28 AM, Dean Collins d...@cognation.net wrote:

  So basically you are saying Twitter wants a chokehold to block apps they
 don’t like which you don’t currently have with basic auth.



 Considering your recent purchase of a twitter client is that really a
 message you want to be spreading at the moment?



 How about leaving it up to end users to make the decision about which
 clients they do and don’t use to access twitter. Restricting all clients to
 oauth only is hardly going to give developers warm and fuzzy feelings that
 with a single keystroke a client can be banned instantly across the entire
 ecosystem.



 Or am I missing something?









 Cheers,

 Dean


   --

 *From:* twitter-development-talk@googlegroups.com [mailto:
 twitter-development-t...@googlegroups.com] *On Behalf Of *Raffi Krikorian
 *Sent:* Wednesday, April 14, 2010 8:59 AM
 *To:* twitter-development-talk@googlegroups.com
 *Subject:* Re: [twitter-dev] Re: Basic Auth Deprecation



 in my ideal world, nobody would have access to a user's password except
 twitter.com -- oauth provides a framework so end applications are not
 storing the actual password.  people are notoriously bad with using the same
 password on lots of different sites.  additionally, oauth provides twitter
 better visibility into the traffic coming into our system, so we can better
 shape traffic needs, we can provide auditing back to users on which
 applications are doing what actions on their behalf, etc.



 On Wed, Apr 14, 2010 at 5:39 AM, Dean #39;at#39; Cognation dot Net 
 d...@cognation.net wrote:

 But why is oauth better than basic for a desktop client?

 i understand it for the webapps but on a desktop client whats the
 point?

 Basically you are saying the desktop end user cant be trusted? Sorry
 but that doesn't make any sense.



 Please explain.


 Cheers,
 Dean



 On Apr 14, 1:15 am, Taylor Singletary taylorsinglet...@twitter.com
 wrote:

  Basic auto being turned off means just that..
 
  Desktop clients can implement xAuth as an alternative, where you do a
  one-time exchange of login and password for an OAuth access token and
  continue from there signing your requests and doing things in the
  OAuth way. You'd no longer, as a best practice and one that I would
  stress in the upmost even on a desktop client, store the login and
  password beyond the xAuth access token negotiation step. If the token
  were revoked you would then query for the login and password again and
  so on and so on and also and also.
 
  Obtaining permission to use xAuth for desktop clients is as easy as

  sending a well-identified and verbose note to a...@twitter.com.

 
  Basic auth had a good run. It's nearly time to say goodnight.
 
  Taylor
 
 
 
 
 

  On Tuesday, April 13, 2010, Dean Collins d...@cognation.net wrote:
   Just so I understand this, applications running on the desktop will
 still work correct? Basic functionality is only being turned off for web
 apps correct? It's not like desktop apps will have to start using oauth.
 
   Cheers,
 
   Dean
 
   -Original Message-
   From: twitter-development-talk@googlegroups.com [mailto:
 twitter-development-t...@googlegroups.com] On Behalf Of Dewald Pretorius
   Sent: Tuesday, April 13, 2010 7:31 PM
   To: Twitter Development Talk
   Subject: [twitter-dev] Re: Basic Auth Deprecation
 
   Could you please announce the hard turn off date somewhere on one of
   your Twitter blogs about a month ahead of time, so that we all have an
   official source to point our users to when we explain to them why
   we're converting everything over to OAuth?
 
   On Apr 13, 8:19 pm, Raffi Krikorian ra...@twitter.com wrote:
   we have announced deprecation, and will hard turn off basic
 authentication
   in june.  the exact date has not been set, but i presume it will be
 later in
   the month.
 
   Is Basic Auth going to be deprecated (as in hard switched-off) in
 
June, or are you in June going to announce depracation, with the
 hard
switch-off then coming a few months later?
 
   --
   Raffi Krikorian
   Twitter Platform Teamhttp://twitter.com/raffi

[twitter-dev] OAuth API calls not succeeding for APIs *always* requiring authentication - Incorrect Signature

2010-03-16 Thread Dan B
I'm sure this is my fault, but I have kind of a bizarre scenario,
where OAuth is working for certain APIs, but not the ones for which
Requires Authorization is always true.

* I am able to obtain access tokens, both through the PIN process and
through xAuth.
* I can successfully use these access tokens to make certain API calls
using GET.  These are APIs that may have different results if the user
is authenticated or not (user_timeline, rate_limit_status, etc).  I
get the expected results for successful authentication
(ie.user_timeline shows tweets for a protected user; lists/my_list/
statuses shows tweets for my private list).
* However, for APIs that *always* require authentication (eg
verify_credentials, mentions, myusername/lists, etc), I get a 401 with
Incorrect signature

I'm not sure what to do.  It was my understanding that OAuth was
pretty unforgiving, so I'm surprised that it seems to half work...

Is this the right forum for this question?  I would be grateful for
any wise counsel!

Dan B


[twitter-dev] Latest post missing in Restful call, present in RSS

2010-01-21 Thread Dan Maharry
Hi,

Strange little problem here. A friend's last tweet is up on his
twitter page at twitter.com/climate_threat and is present in the RSS,
but on calling Twitter's RESTful API, the tweet is missing (http://
api.twitter.com/1/statuses/user_timeline/climate_threat.xml).

Any idea why this might be the case?

Thanks.


[twitter-dev] Incorrect Retweet Responses

2009-11-25 Thread Dan Deming-Henes
I'm working to integrate support for official retweets in my app, but
I'm running into issues. I believe I'm getting incorrect responses
from Twitter.

When successful I get the correct response (info about a new tweet
that is a retweet of the original tweet). However, when I ask to
retweet a tweet from a private account or some other illegal action,
rather than getting an error response, I get info about a retweet of
this tweet: http://twitter.com/brettschulte/status/5656834480.

I've tested this from two accounts (@TwittBeta, @AlternatePixel) and
have gotten the same results.

Also, not sure if it's any help, but looking at the incorrect response
(attached below), I noticed that there is no ID for the retweet.
Perhaps this has something to do with why it's getting returned?

Hope this can get fixed soon.

Dan

- The Incorrect Response

?xml version=\1.0\ encoding=\UTF-8\?
status
  created_at/created_at
  id/id
  textRT @brettschulte: Beer drinking this weekend.  Who's in?
http://bit.ly/9Kb3u/text
  sourcelt;a href=quot;http://apiwiki.twitter.com/quot;
rel=quot;nofollowquot;gt;APIlt;/agt;/source
  truncatedfalse/truncated
  in_reply_to_status_id/in_reply_to_status_id
  in_reply_to_user_id/in_reply_to_user_id
  favoritedfalse/favorited
  in_reply_to_screen_name/in_reply_to_screen_name
  retweeted_status
created_atThu Nov 12 19:09:52 + 2009/created_at
id5656834480/id
textBeer drinking this weekend.  Who's in?  http://bit.ly/9Kb3u/text
sourcelt;a href=quot;http://www.tweetdeck.com/quot;
rel=quot;nofollowquot;gt;TweetDecklt;/agt;/source
truncatedfalse/truncated
in_reply_to_status_id/in_reply_to_status_id
in_reply_to_user_id/in_reply_to_user_id
favoritedfalse/favorited
in_reply_to_screen_name/in_reply_to_screen_name
user
  id676203/id
  nameBrett Schulte/name
  screen_namebrettschulte/screen_name
  locationLos Angeles/location
  description#220;ber Geek/description
  profile_image_urlhttp://a1.twimg.com/profile_images/60304100/
JVI_0224_normal.jpg/profile_image_url
  urlhttp://www.brettschulte.com/url
  protectedfalse/protected
  followers_count1848/followers_count
  profile_background_color1A1B1F/profile_background_color
  profile_text_color66/profile_text_color
  profile_link_color2FC2EF/profile_link_color
  profile_sidebar_fill_color252429/profile_sidebar_fill_color
  profile_sidebar_border_color181A1E/
profile_sidebar_border_color
  friends_count417/friends_count
  created_atSun Jan 21 19:29:04 + 2007/created_at
  favourites_count4/favourites_count
  utc_offset-28800/utc_offset
  time_zonePacific Time (US amp; Canada)/time_zone
  profile_background_image_urlhttp://s.twimg.com/a/1257899144/
images/themes/theme9/bg.gif/profile_background_image_url
  profile_background_tilefalse/profile_background_tile
  statuses_count5964/statuses_count
  notificationsfalse/notifications
  geo_enabledfalse/geo_enabled
  verifiedtrue/verified
  followingtrue/following
/user
geo/
  /retweeted_status
  user
id15199539/id
nameMark Milian/name
screen_namemarkmilian/screen_name
locationLos Angeles/location
descriptionla times writer: tech + social media + politics +
indie rock music/description
profile_image_urlhttp://a3.twimg.com/profile_images/475986397/
DSC00397-post_normal.JPG/profile_image_url
urlhttp://markmilian.com/url
protectedfalse/protected
followers_count2228/followers_count
profile_background_color648ACE/profile_background_color
profile_text_color00/profile_text_color
profile_link_color346A8F/profile_link_color
profile_sidebar_fill_colorFFE3AF/profile_sidebar_fill_color
profile_sidebar_border_color485D6C/
profile_sidebar_border_color
friends_count222/friends_count
created_atSun Jun 22 18:32:07 + 2008/created_at
favourites_count60/favourites_count
utc_offset-28800/utc_offset
time_zonePacific Time (US amp; Canada)/time_zone
profile_background_image_urlhttp://a1.twimg.com/
profile_background_images/3682820/ew-t.png/
profile_background_image_url
profile_background_tilefalse/profile_background_tile
statuses_count1969/statuses_count
notificationsfalse/notifications
geo_enabledfalse/geo_enabled
verifiedfalse/verified
followingfalse/following
  /user
  geo/
/status


[twitter-dev] Re: Lists API

2009-11-03 Thread Dan

Yep, on for everyone.

Just waiting and hoping for whitelisting so I can actually release the
website I built around the API. Right now I can't make enough calls to
keep its database fresh.


[twitter-dev] Re: Twitter Lists: /user/list/members.xml returning only 20 at a time

2009-10-30 Thread Dan

Hoping for an answer to this as well. The last dev post said that
cursors would be added to list-of-lists functions, but they didn't
mention followers-of-lists getting the treatment. It is much needed.

On Oct 24, 6:18 pm, Dave Briccetti da...@davebsoft.com wrote:
 How can I retrieve more than 20 at a time?

 ?cursor=-1count=200  has no effect


[twitter-dev] Re: Updates to the List API (list descriptions, cursoring lists of lists, finding by list id rather than slug more consistent names)

2009-10-30 Thread Dan

The update says all requests that produce a list *of lists* will have
a cursor option.

What about lists of members following/followed on/by a list?

If I want to download the list of people following a list, members.xml
currently gives only 20 users. Is there a way to ask for more, or to
get the next page?


[twitter-dev] Re: heavy throttling by search.twitter.com API from GAE application

2009-09-03 Thread Dan

I figured out this problem; it was not related after all.  I needed to
set the user-agent when using curl, with the curl_setopt command (in
PHP).  Once I did that I did not have problems using the Search API.


On Aug 29, 7:03 pm, Dan danec...@gmail.com wrote:
 I'm not sure if this is related.  I've been using Services_Twitter to
 use theSearchAPI and I keep getting the error message 
 Unsupportedendpointsearch.  I'm searching a simple 7-letter word.  Anyone 
 have
 any idea what that message means?  Maybe this is related to something
 going on with Twitter'sSearchAPI?


[twitter-dev] Re: heavy throttling by search.twitter.com API from GAE application

2009-08-29 Thread Dan

I'm not sure if this is related.  I've been using Services_Twitter to
use the Search API and I keep getting the error message Unsupported
endpoint search.  I'm searching a simple 7-letter word.  Anyone have
any idea what that message means?  Maybe this is related to something
going on with Twitter's Search API?


[twitter-dev] Re: Invalid / used nonce

2009-08-11 Thread Dan Borthwick

For our app, we successfully call request_token from our server. When
we then call statuses/update from the client, we get a 401 'Invalid /
used nonce' response. If the request_token call comes directly from
the client, the update call succeeds.

The nonces have been sanity checked and are definitely different for
each call. GET requests to users/show succeed regardless of whether
the request_token comes from the proxy server or client. Code is based
on MGTwitterEngine-1.0.8-OAuth.

The same code was working ok prior to the recent DoS downtime. Perhaps
something has been changed on Twitter's side that might result in the
401 response?



On Aug 11, 8:38 am, graceawalker grace_blo...@hotmail.com wrote:
 No, my nonce is definately new every time. Surely if there was
 something wrong with the way it was being generated it would error
 during requestToken/accessToken/VerifyCredentials too?? All the code
 ive looked through is doing it exactly the same way. Is the 'status'
 parameter being used just like all the oauth parameters? is an
 'invalid nonce' error, definately an invalid nonce or could it be to
 do with the timestamp and timezones. Clutching at straws here...

 On Aug 11, 3:12 am, Chris Babcock cbabc...@asciiking.com wrote:

  On Mon, 10 Aug 2009 04:14:43 -0700 (PDT)

  graceawalker grace_blo...@hotmail.com wrote:
   I am calling and getting the whole way up to getting the access token
   just fine in my app (one im writing myself in c#), but when i try and
   call the update status URL im getting an 'Invalid/used nonce' error in
   my response data. Im not sure why this is, im calling the update
   method in the exact same way that i called request token apart from
   the new 'status' parameter in the query string. I call 'verify
   credentials' with my access token to ensure that it is working and it
   sends me back all of the correct data, but it is erroring when trying
   to update my status. Is there any obvious solution to this, or am i
   not supposed to be signing and organising the parameters in the same
   way that i did before? Im really stuck here guys and need help!

  Right, the nonce is a number used once. Its purpose is to prevent
  replay attacks. If you use the same nonce for more than one call to the
  API then you *should* be getting an error.

  Chris




[twitter-dev] Re: Invalid / used nonce

2009-08-11 Thread Dan

We have also been seeing similar behaviour for our iPhone app based on
MGTwitterEngine-1.0.8-OAuth.

If we call request_token from the client followed by statuses/update,
everything works ok. However, if we send the request_token from our
server, then statuses/update from the client, a 401 Invalid / used
nonce is returned.

GET requests to users/show work in either case.

The same code was working ok prior to the recent DoS problems, so
perhaps something has changed on Twitter's side?


On Aug 11, 8:38 am, graceawalker grace_blo...@hotmail.com wrote:
 No, my nonce is definately new every time. Surely if there was
 something wrong with the way it was being generated it would error
 during requestToken/accessToken/VerifyCredentials too?? All the code
 ive looked through is doing it exactly the same way. Is the 'status'
 parameter being used just like all the oauth parameters? is an
 'invalid nonce' error, definately an invalid nonce or could it be to
 do with the timestamp and timezones. Clutching at straws here...

 On Aug 11, 3:12 am, Chris Babcock cbabc...@asciiking.com wrote:

  On Mon, 10 Aug 2009 04:14:43 -0700 (PDT)

  graceawalker grace_blo...@hotmail.com wrote:
   I am calling and getting the whole way up to getting the access token
   just fine in my app (one im writing myself in c#), but when i try and
   call the update status URL im getting an 'Invalid/used nonce' error in
   my response data. Im not sure why this is, im calling the update
   method in the exact same way that i called request token apart from
   the new 'status' parameter in the query string. I call 'verify
   credentials' with my access token to ensure that it is working and it
   sends me back all of the correct data, but it is erroring when trying
   to update my status. Is there any obvious solution to this, or am i
   not supposed to be signing and organising the parameters in the same
   way that i did before? Im really stuck here guys and need help!

  Right, the nonce is a number used once. Its purpose is to prevent
  replay attacks. If you use the same nonce for more than one call to the
  API then you *should* be getting an error.

  Chris


[twitter-dev] Re: Question About Post Commands

2009-08-07 Thread Dan Kurszewski

My issue is the amount of time it takes to do a certain number of
friendship/destroy and friendship/create calls.  Right now I am using
the code from the original post.

Would the oAuth speed this up versus the posts that I am doing?

Does anyone else know a way to speed up a larger group of API calls?

Thanks,
Dan


[twitter-dev] Question About Post Commands

2009-08-06 Thread Dan Kurszewski

Does anyone know if there is a way with VB.Net or C# to login to
twitter, call 100 post commands, and then logout?

Here is my code for making a single post command in VB.Net.  As you
can see every time I call this function it has to login.  I would love
to have an array of url's and/or data that need to be processed for
the same username and password and having only one login.  I have
tried rearranging things several different ways with no luck.

Any help would be greatly appreciated.

---

Public Function ExecutePostCommand(ByVal url As String, ByVal
username As String, ByVal password As String, _
ByVal data As String) As String

Try
Dim request As HttpWebRequest = HttpWebRequest.Create(url)
request.ServicePoint.Expect100Continue = False

If Not String.IsNullOrEmpty(username) And Not
String.IsNullOrEmpty(password) Then
request.Credentials = New NetworkCredential(username,
password)
request.ContentType = application/x-www-form-
urlencoded
request.Method = POST

Dim bytes As Byte() = Encoding.UTF8.GetBytes(data)

request.ContentLength = bytes.Length

Dim s As Stream
s = request.GetRequestStream
s.Write(bytes, 0, bytes.Length)

Dim r As HttpWebResponse
r = request.GetResponse

Dim sr As StreamReader
sr = New StreamReader(r.GetResponseStream)

Return sr.ReadToEnd

Else
Throw New Exception(Username or Password is Null)
End If

Catch ex As Exception
Throw ex
End Try

End Function



[twitter-dev] Re: Please Help - Brand New (403) Forbidden Errors

2009-08-04 Thread Dan Kurszewski

This is Basic Auth.

Dan


[twitter-dev] Re: Please Help - Brand New (403) Forbidden Errors

2009-08-04 Thread Dan Kurszewski

Here is what is happening.  I am trying to create an app that runs on
my desktop.  It does a friendships/destroy on people that have chosen
not to follow me and does a friendships/create on people who are
following me that I have yet to follow.  This is supposed to be
similar to Twitter Karma.

Because I am in the development phase, I have had to do a lot of
testing.  Here are the steps I take to test.

1. I login in to Twitter via IE and add pick a handful of people to
follow.
2. I then go to my desktop app and click on a button and the process
starts.
3. The app does what it does and then I have the perfect number of
followers and friends (with the exception of followers who are no
longer allowed users).  By doing this it makes sure I never reach my
follower limits.
4. I do it again and again and again and 
5. After a while I start getting the 403 errors.

So my questions are this.
1. Is there a limit to how many times I can do friendships/destroy or
friendships/create?  According to the API documentation, neither of
these apply towards the rate limit.
2. Is there a limit to the number of times a certain username can
login to Twitter in an hour, a day, etc?
3. Is there a limit to the number of times calls like this are made by
a certain IP address?

Any help would be greatly appreciated.


[twitter-dev] Re: Please Help - Brand New (403) Forbidden Errors

2009-08-04 Thread Dan Kurszewski

Does anyone know the limit to friendship create/destroy calls per
hour, per day, etc?  There has to be a number out there somewhere.  If
I knew this number than I could have a counter that stops once the
limit is reached.

Thanks,
Dan


[twitter-dev] follwers ids and friends ids

2009-08-03 Thread Dan Kurszewski

I am having problems with the followers ids and friends ids calls.

reprosites has 6318 friends and 5960 followers.

If I do a regular call with no paging I get the proper results.

But if I page some wierd stuff happens.

http://twitter.com/friends/ids/reprosites.xml?page=1 returns 5000
results like expected.
http://twitter.com/friends/ids/reprosites.xml?page=2 returns nothing
when it should at least have some results.

http://twitter.com/followers/ids/reprosites.xml?page=1 returns 5000
results like expected.
http://twitter.com/followers/ids/reprosites.xml?page=2 returns nothing
when it should at least have some results.

Could someone please let me know what I am doing wrong?

Dan


[twitter-dev] Please Help - Brand New (403) Forbidden Errors

2009-08-03 Thread Dan Kurszewski

I have all of a sudden started getting The remote server returned an
error: (403) Forbidden any time I try to destroy a friend or add a
friend.  This all worked fine for the past couple of days.

Can anyone explain what might be happening?

Thanks,
Dan


[twitter-dev] #IranElection - postpone downtime?

2009-06-15 Thread Dan Brickley


(sorry this is a bit offtopic, but hey...)

http://twitter.com/#search?q=%23IranElection

Seems a lot of comments today suggesting that the planned downtime is 
unfortunately scheduled, given the role twitter is playing in reporting 
events from Iran. Can the downtime be postponed?


Dan


[twitter-dev] Re: Change the link of the source [My App]

2009-06-08 Thread Dan Boger
Don't know about Jony, but I haven't been able to figure out how to update
my app's basic auth source param.  Is there a way to do it?

Trying to update twirssi to point to http://twirssi.com.  Basically gave up
on it, seems the only thing I can do is register a new source?

Dan (@zigdon)

On Mon, Jun 8, 2009 at 09:42, Doug Williams d...@twitter.com wrote:

 Jony,Is this for an OAuth application or a basic auth source parameter?

 Thanks,
 Doug





 On Mon, Jun 8, 2009 at 8:45 AM, jonylt jon...@gmail.com wrote:


 Hi, I don't know what i'm making wrong. I have added an application
 with oauth interface to twitter, everything is working fine. But now
 i'm trying to change the link of the from [My App] without success.
 I've tried changing both fields in the application edition
 (Application Website, and Website itself) but nothing changed on the
 new posted tweets.
 Anybody can help me on this?
 Thanks, Jony





-- 
Dan Boger


[twitter-dev] Re: Bulk id - screen_name resolution.

2009-05-31 Thread Dan Brickley


On 31/5/09 13:03, Stuart wrote:

Since there's clearly a lot of demand for this feature is it not
possible for it to be added to the official API? I'd hesitate before
building anything on top of Twitter that also relies on a third party
for something so basic.


Related suggestion: have common REST API for external services who can 
provide this information. You can probably get it from google social 
graph API too, for example.


Dan


[twitter-dev] Re: Date-based update retrieval

2009-03-28 Thread Dan

The since parameter doesn't achieve what I want since it pulls in
all the unneeded tweets AFTER the specified date as well.

This isn't just a personal project; if I can get this to work, it
would be on a multi-user scale, where each user supplies his or her
twitter credentials and can then see their tweets when they click on a
specific day. Manually downloading a CSV file and parsing it each and
every time would be a waste of server resources. It seems like the API
would be robust enough to handle a SELECT ALL TWEETS FROM $date.

Is it impossible to write a script that will show me my own tweets for
a given day?

On Mar 28, 12:39 am, Abraham Williams 4bra...@gmail.com wrote:
 You can use the since parameter for going up to 24 hours old. Otherwise you
 have to just manually page back until you get what you need.

 On Fri, Mar 27, 2009 at 23:34, Dan dan.chil...@gmail.com wrote:

  Perhaps I'm completely missing this, but if I can properly
  authenticate a user in a PHP script, how can I then retrieve their
  updates for a particular date?

 --
 Abraham Williams |http://the.hackerconundrum.com
 Web608 | Community Evangelist |http://web608.org
 This email is: [ ] blogable [x] ask first [ ] private.
 Sent from: Madison WI United States.


[twitter-dev] Date-based update retrieval

2009-03-27 Thread Dan

Perhaps I'm completely missing this, but if I can properly
authenticate a user in a PHP script, how can I then retrieve their
updates for a particular date?


[twitter-dev] Re: paid pro accounts

2009-03-26 Thread Dan Brickley


On 26/3/09 14:25, Joshua Perry wrote:

Not to start speculating but when Biz says Will there be opportunities
for introducing customers to businesses on Twitter? it makes me
nervous, because what this really means is, Will there be opportunities
to get paid to let companies spam our users?.

And I say this because with Twitter clients, and services like Twitpic
already starting to capitalize directly from people interfacing with
Twitter through their applications, I don't know how Twitter would
accomplish this introduction purely by Ads on its web site. These
applications and websites, for some people, are becoming the interface
to Twitter and they do not have access to Ad space on these properties.

Does that just leave us tweets, or texts as a reliable way for Twitter
to introduce companies to users?


The xyz is now following you on twitter emails are another reasonable 
place for financially-lubricated introductions, whether contextual 
(Nearby On Twitter: xyz is also following abc, a supplier of custom 
blahblahs to the foobar industry. Here are abc's last 3 tweets, for 
more, CLICK HERE TO SUBSCRIBE NOW, etc etc) or just footer/boilerplate 
sponsored by links.


Dan

--
http://danbri.org/



[twitter-dev] Re: Twitter Developer Nest - An event for our community

2009-02-20 Thread Dan Boger
IRC would be useful.  In general, are there any twitter-dev channels
floating around?  (other than my #twirssi :)

Dan

On Fri, Feb 20, 2009 at 11:00, Alex Payne a...@twitter.com wrote:


 Seconding that. We'd love to be telepresent, even if just via an audio
 stream or IRC or similar.

 On Fri, Feb 20, 2009 at 09:34, dougw igu...@gmail.com wrote:
 
  Jonathan,
  Are you going to stream this live or blog any of the topics/concerns/
  outcomes of this event?
 
  I will be extremely interested in remotely watching the discussion.
 
  Thanks,
  @dougw
 
  On Feb 20, 11:53 am, Jonathan Markwell j.l.markw...@inuda.com wrote:
  There will be pizza and beer to wash it down...
 
  ... not sure what exactly will be on the pizza but there may be an
  option for pre-chewed if required. ;)
 
  Parking underneath the Nest is not recommended :). Arriving via public
  transport is.
 
  Only 19 out of 90 tickets remaining.
 
 
 
  On Fri, Feb 20, 2009 at 2:23 PM, Andrew Badera and...@badera.us
 wrote:
   Will said Nest involve refreshments such as bug or nightcrawler
 (preferably
   pre-chewed)? Should we be aware not to park underneath the Nest?
 
   On Fri, Feb 20, 2009 at 7:10 AM, Jon j.l.markw...@inuda.com wrote:
 
   Hi Everyone
 
   I'm please to announce a new community event for people doing the
   things we do - developing Twitter apps.
 
   It's called the Twitter Developer Nest and the first event will be in
   London on the evening of 24th March. You can find out more and grab a
   ticket here:
 
  http://twitterdevelopernest.com/2009/02/london-launch-event/
 
   Or follow @devnest for updates.
 
   If you are not in the UK and are interested in running an event like
   this in your part of the world please let me know and we'll see what
   we can do to help.
 
   Best wishes,
 
   Jon / @madmotive
 
   --
   Jonathan Markwell
   Engineer | Founder | Connector
 
   Inuda Innovations Ltd, Brighton, UK
 
   Web application development  support
   Twitter  Facebook integration specialists
  http://inuda.comhttp://twitter.com/inuda
 
   Providing a nice place to work in the heart of Brighton -
  http://theskiff.org
 
   Helping people make a difference with technology  -http://inuda.org
 
   Measuring your brand's visibility on the social web -
  http://HowSociable.com
 
   mob: 07766 021 485 | tel: 01273 704 549 | fax: 01273 376 953
   skype: jlmarkwell | twitter:http://twitter.com/madmotive
 
  --
  Jonathan Markwell
  Engineer | Founder | Connector
 
  Inuda Innovations Ltd, Brighton, UK
 
  Web application development  support
  Twitter  Facebook integration specialistshttp://inuda.com
 
  Providing a nice place to work in the heart of Brighton -
 http://theskiff.org
 
  Helping people make a difference with technology  -http://inuda.org
 
  Measuring your brand's visibility on the social web -
 http://HowSociable.com
 
  mob: 07766 021 485 | tel: 01273 704 549 | fax: 01273 376 953
  skype: jlmarkwell | twitter:http://twitter.com/madmotive
 



 --
 Alex Payne - API Lead, Twitter, Inc.
 http://twitter.com/al3x




-- 
Dan Boger


Twitter trends for particular subjects, hashtags, @replies

2009-02-07 Thread Dan

Has anyone found a way to work the API to get this sort of
functionality?  We are able to determine the top 10 trends for all of
twitter at any given time, but what about trends for all @replies to a
particular user, or trends in posts that contain a particular hashtag?


Re: Twitter app user poaching

2009-01-27 Thread Dan Brickley



On 27/1/09 19:07, Chad Etzel wrote:

Hi all,

I have been contemplating sending this email for a long time, and
finally have decided to just do it, so here goes:

I understand that we are all trying to gain large user-bases for our
twitter apps, and I know there are several tactics to go about doing
it; but I am wondering what is everbody's opinion on the tactic I
refer to as twitter app user poaching in which app devs tweet out to
people right after a user mentions some other app in their tweets:

@somebody hey, if you likeinsert competitor app here  you should
trymy app! http://link.to.my.app.com/ 

Obviously people are monitoring their app's brand and their
competitors' brand, which is obviously a savvy business strategy in
general... but somehow to me, in the twitter ecosystem, this feels
kinda sleazy.  I have consciously tried to avoid doing this because a)
the aforementioned sleaziness, and b) i don't think my followers would
appreciate a stream of constant hey check out my app tweets.  Maybe
I am alone here, what does everyone else think?

This would not be so bad if some of the apps that have started
poaching mine were brand new and not very well known yet.  But at
least a couple have received a lot of coverage on the big social media
blogs (mashable, techcrunch, etc...).  None of my apps have had such
coverage (and yes, I am willing to admit I am jealous of that fact,
but it is what it is), and despite that, I have had a lot of fun
growing my user-base organically through twitter itself and my users'
word-of-mouth recommendations.  I don't really appreciate others
coming in and sniping my users away.

So, maybe I'm just being weak and need to grow a pair and deal with it
(by either a) sucking it up, or b) engaging in poaching myself, or c)
both).  Maybe all is fair in love and tweets...

Would love to hear about others' experiences in this area.


They probably *should* try other apps, so they find one that suits them
best. Hopefully yours! You can't please all the users, all of the time.
Worry less about people comparing, and more about building an app that
will compare well. Maybe they'll try the others, go back to yours, and 
then write about why they preferred it.


BTW I've been having trouble with Twhirl today, and posted about it, got 
useful feedback from twhirl users and developers, as well as people 
using other apps. We all have different constraints and preferences, and 
exploring the different design possibilities is a healthy and natural 
thing...


cheers,

Dan

--
http://danbri.org/



Re: Followings Updates not coming from AP

2008-12-10 Thread Dan at Tivot

We are seing the exact same thing.   Starting late last night, any
attempt made as follows...

https://twitter.com/users/show/{USER}.xml

... Are missing the elements for friends and status updates.  Not
showing a zero.  The elements are just missing from the response.

Twhirl is showing zeros for those values as well.

On Dec 10, 11:50 am, jje [EMAIL PROTECTED] wrote:
 Followers are coming through on our call but the Followings and
 Updates are not, no error just no #'s. seewww.whatsyourtweetworth.com
 and enter user name..not all info is coming through and yesterday it
 was working.

 thanks for the help- developer is out, but he can add more details
 once he is available. I'm just trying to figure out if its on our
 end.

 On Dec 10, 1:36 pm, Steve Ng Ming Yeow [EMAIL PROTECTED] wrote:



  Hi Jje,
    Think you might need to elaborate a bit more.

    We might have the same issue (and i have seen it being mentioned in some
  other places), but would need more details to ascertain.

    Do you get an error, or are the changes in following just not being
  reflected?

  M

  On Wed, Dec 10, 2008 at 11:23 AM, jje [EMAIL PROTECTED] wrote:

   Just wondering if there is any discussion on the current followings 
   updates not coming through on our ping to the API?

   Thanks

  --
  Discovery - Going Beyond Engagement:http://is.gd/op2(MyCurrent Pet
  Project)
  What I do:http://v3.mingyeow.com/?page_id=5- Hide quoted text -

 - Show quoted text -


Re: Redirect from POST?

2008-11-27 Thread Dan Phiffer

Oh wait, I think I can use iframes. Nevermind all that.

On Nov 27, 11:57 am, Dan Phiffer [EMAIL PROTECTED] wrote:
 Hi all,

 I've been playing around with building a Twitter client in pure
 Javascript and it's actually working better than I'd expected. The
 only real hiccup I've encountered so far is with API calls that
 require the use of POST. Since I'm relying on JsonP to get off-domain,
 I think these POST calls require that the client browser redirect to
 twitter.com.

 I'm wondering if there could be a 'redirect' query string argument
 telling twitter.com to send the client back to a specified URL. Or
 does something like this exist and I just missed it? Or maybe this is
 a bad idea for some reason?

 Thanks in advance,
 -Dan