Re: [twitter-dev] Re: Application Suspended

2010-02-17 Thread John Meyer

On 2/15/2010 4:14 PM, Dewald Pretorius wrote:

Oh for crying out loud, is everyone now going to stare themselves
blind at the phrase Gestapo-like and forget about the issue at hand?

It is meant to portray a one-sided action where the accused party is
not afforded a voice, or his/her objections, rationale, or
explanations are ignored.

C'mon, FFS, you know what I mean.

Nobody has called anybody a Nazi, okay?



I'm sorry Dewald, but when I think Gestapo, knitting circle is not the 
first thing that comes to mind.  Nazi is.  Yes Twitter needs to be a 
little more clear in their communication (ironic?) with developers and 
not just send out blank e-mails when they deny a whitelist application 
or blacklist somebody as spam.  But that is not Gestapo-like tactics. 
 Go ask a survivor of WWII; I'm sure they could tell you the difference.


Re: [twitter-dev] Re: Application Suspended

2010-02-17 Thread Cameron Kaiser
  C'mon, FFS, you know what I mean.
  Nobody has called anybody a Nazi, okay?
 
 I'm sorry Dewald, but when I think Gestapo, knitting circle is not the 
 first thing that comes to mind.  Nazi is.  Yes Twitter needs to be a 
 little more clear in their communication (ironic?) with developers and 
 not just send out blank e-mails when they deny a whitelist application 
 or blacklist somebody as spam.  But that is not Gestapo-like tactics. 
   Go ask a survivor of WWII; I'm sure they could tell you the difference.

I think Ryan Sarver has covered most of this in his reply.

-- 
 personal: http://www.cameronkaiser.com/ --
  Cameron Kaiser * Floodgap Systems * www.floodgap.com * ckai...@floodgap.com
-- Time makes more converts than reason. -- Thomas Payne --


Re: [twitter-dev] huge Fail Whale quotient suddenly

2010-02-17 Thread Scott Wilcox
Perhaps some kind of status indication such as green/amber/red lights?

Scott.

On 17 Feb 2010, at 06:54, Tim Haines wrote:

 Hey Raffi,
 
 It would probably be helpful for a lot of us if the status blog (or another 
 secondary indicator) was  more accurate in terms of being a problem/no 
 problem indicator.  Even if it didn't have an indication as to cause or 
 expected time to resolve, just a little flag that said 'we acknowledge an 
 increased error rate right now' it would be helpful.
 
 Tim.
 
 
 On Wed, Feb 17, 2010 at 7:27 PM, Raffi Krikorian ra...@twitter.com wrote:
 yeah - by the time we got ready to put the post up, on this particular issue, 
 we had solved the problem.
 
 
 On Tue, Feb 16, 2010 at 6:30 PM, Abraham Williams 4bra...@gmail.com wrote:
 Never did get a post on status.twitter.com on this.
 
 Abraham
 
 
 On Mon, Feb 15, 2010 at 15:24, Raffi Krikorian ra...@twitter.com wrote:
 we're aware of the issue and are working on it - i expect a post to 
 status.twitter.com in a bit.
 
 
 On Mon, Feb 15, 2010 at 3:17 PM, Yu-Shan Fung ambivale...@gmail.com wrote:
 We're seeing the same thing, especially with OAuth. Nothing's posted on 
 status.twitter.com yet. Any updates?
 
 Thanks!
 Yu-Shan
 
 
 On Mon, Feb 15, 2010 at 2:50 PM, Cameron Kaiser spec...@floodgap.com wrote:
 Over the last few minutes, I'm seeing a huge jump in Fail Whales. What
 happened?
 
 --
  personal: http://www.cameronkaiser.com/ 
 --
  Cameron Kaiser * Floodgap Systems * www.floodgap.com * ckai...@floodgap.com
 -- Everyone is entitled to my opinion. -- James Carpenter 
 -
 
 
 
 -- 
 “When nothing seems to help, I go look at a stonecutter hammering away at his 
 rock perhaps a hundred times without as much as a crack showing in it. Yet at 
 the hundred and first blow it will split in two, and I know it was not that 
 blow that did it, but all that had gone before.” — Jacob Riis
 
 
 
 -- 
 Raffi Krikorian
 Twitter Platform Team
 http://twitter.com/raffi
 
 
 
 -- 
 Abraham Williams | Community Advocate | http://abrah.am
 Project | Out Loud | http://outloud.labs.poseurtech.com
 This email is: [ ] shareable [x] ask first [ ] private.
 Sent from Seattle, WA, United States
 
 
 
 -- 
 Raffi Krikorian
 Twitter Platform Team
 http://twitter.com/raffi
 



smime.p7s
Description: S/MIME cryptographic signature


[twitter-dev] Is it OK to store token in COOKIE?

2010-02-17 Thread Dmitri Snytkine
Just wondering, is it a bad practive for a web-based app to store
user's token and secret in cookies?
This would of cause simplify and speed up the login, but is it a
security risk?


Re: [twitter-dev] Is it OK to store token in COOKIE?

2010-02-17 Thread John Meyer

On 2/17/2010 5:32 AM, Dmitri Snytkine wrote:

Just wondering, is it a bad practive for a web-based app to store
user's token and secret in cookies?
This would of cause simplify and speed up the login, but is it a
security risk?




When you boil it down, everything done to increase accessibility is a 
security risk.  I would think that if you keep your consumer key pair on 
the server there is little problem with this.


Re: [twitter-dev] huge Fail Whale quotient suddenly

2010-02-17 Thread Aral Balkan
It would be awesome to have a status API – isolated from the actual API –
that applications can ping and use to display helpful information to users.
(Or even just a very simple page that you could load in – even in a mobile
app – to display the current status of Twitter when something goes wrong in
the app).

Aral

On Wed, Feb 17, 2010 at 1:57 PM, Cameron Kaiser spec...@floodgap.comwrote:

  Perhaps some kind of status indication such as green/amber/red lights?

 They did that for awhile by feature set, but the problem was that it wasn't
 dynamic enough to give an accurate picture IIRC.

 --
  personal:
 http://www.cameronkaiser.com/ --
  Cameron Kaiser * Floodgap Systems * www.floodgap.com *
 ckai...@floodgap.com
 -- If you want divine justice, die. -- Nick Seldon
 



[twitter-dev] Forum API on twitter

2010-02-17 Thread Bertrand Azzopardi
Hi I would like to create a twitter application which retrieves
information from a website and puts them on twitter.  The idea is
having a forum on the website where people can post their own comments
and even reply to a posted comment.  The forum must be updated both on
twitter and the website irrelvant where the user entered the info.
Would this be possible using any existant tools?  If so would it be
possible to provide me some links?

I thank you in advance and hope to hear from you soon.


Re: [twitter-dev] Re: Rate Limiting Twitter

2010-02-17 Thread Cory Albrecht
Speaking of rate limiting, I was trying to learn the Twitter API and 
Net::Twitter by making six degrees of twitter that would figure out 
how many hops it was from Account A to Account B when I ran up against 
limiting.


The way I had thought of doing it was basically the list of whom a 
person follows and if they follow back its a valid Nth degree hop. Then 
get whom that hop is following, see if they are following back, and just 
cycle outwards until you find the destination account. I'm sure you can 
see how quickly that eats up a rate limit.


Is the only way around that to apply for whitelisted status? Or are 
there some API tricks that I, as a noob, haven't stumbled across yet?


[twitter-dev] Re: What's up with OAuth?

2010-02-17 Thread Shannon Whitley
Hi,

What is the expected wait time after submitting a request for xAuth
access?

I'm trying to let a client know how long the development cycle will
take, but a lot depends on this approval.  My request is currently
pending from Thursday or Friday of last week.

Thank you.




[twitter-dev] How to format quotes for status/update

2010-02-17 Thread Fred Garvin
When sending a status update through the API how should quotes be
formatted?

I am using $status = htmlspecialchars($status, ENT_QUOTES, 'UTF-8');
in php with no luck, single and double quotes show up on twitter
escaped with a backslash.

Thanks.


Re: [twitter-dev] Re: What's up with OAuth?

2010-02-17 Thread Raffi Krikorian
we're in the process of putting the last pieces of infrastructure in place
-- once that is in place, then the turnaround time on requests will be
fairly quick.  right now, all requests are being logged, and will be
responded to.

On Wed, Feb 17, 2010 at 7:23 AM, Shannon Whitley
swhit...@whitleymedia.comwrote:

 Hi,

 What is the expected wait time after submitting a request for xAuth
 access?

 I'm trying to let a client know how long the development cycle will
 take, but a lot depends on this approval.  My request is currently
 pending from Thursday or Friday of last week.

 Thank you.





-- 
Raffi Krikorian
Twitter Platform Team
http://twitter.com/raffi


Re: [twitter-dev] huge Fail Whale quotient suddenly

2010-02-17 Thread Raffi Krikorian
this feature has definitely been in our head - the obvious problem, of
course, is if the API is having issues, and you host a status API in the
same place

On Wed, Feb 17, 2010 at 6:45 AM, Aral Balkan aralbal...@gmail.com wrote:

 It would be awesome to have a status API – isolated from the actual API –
 that applications can ping and use to display helpful information to users.
 (Or even just a very simple page that you could load in – even in a mobile
 app – to display the current status of Twitter when something goes wrong in
 the app).

 Aral


 On Wed, Feb 17, 2010 at 1:57 PM, Cameron Kaiser spec...@floodgap.comwrote:

  Perhaps some kind of status indication such as green/amber/red lights?

 They did that for awhile by feature set, but the problem was that it
 wasn't
 dynamic enough to give an accurate picture IIRC.

 --
  personal:
 http://www.cameronkaiser.com/ --
  Cameron Kaiser * Floodgap Systems * www.floodgap.com *
 ckai...@floodgap.com
 -- If you want divine justice, die. -- Nick Seldon
 





-- 
Raffi Krikorian
Twitter Platform Team
http://twitter.com/raffi


Re: [twitter-dev] huge Fail Whale quotient suddenly

2010-02-17 Thread Ryan Sarver
Tim,

We are working on this for our forthcoming developer site. Mark should
be posting to the list in the coming days to get feedback from
everyone on what they would like to see.

We know it's needed and look forward to finally having something in place.

Best, Ryan

On Wed, Feb 17, 2010 at 6:54 AM, Tim Haines tmhai...@gmail.com wrote:
 Hey Raffi,
 It would probably be helpful for a lot of us if the status blog (or another
 secondary indicator) was  more accurate in terms of being a problem/no
 problem indicator.  Even if it didn't have an indication as to cause or
 expected time to resolve, just a little flag that said 'we acknowledge an
 increased error rate right now' it would be helpful.

 Tim.

 On Wed, Feb 17, 2010 at 7:27 PM, Raffi Krikorian ra...@twitter.com wrote:

 yeah - by the time we got ready to put the post up, on this particular
 issue, we had solved the problem.

 On Tue, Feb 16, 2010 at 6:30 PM, Abraham Williams 4bra...@gmail.com
 wrote:

 Never did get a post on status.twitter.com on this.
 Abraham

 On Mon, Feb 15, 2010 at 15:24, Raffi Krikorian ra...@twitter.com wrote:

 we're aware of the issue and are working on it - i expect a post to
 status.twitter.com in a bit.

 On Mon, Feb 15, 2010 at 3:17 PM, Yu-Shan Fung ambivale...@gmail.com
 wrote:

 We're seeing the same thing, especially with OAuth. Nothing's posted on
 status.twitter.com yet. Any updates?
 Thanks!
 Yu-Shan


 On Mon, Feb 15, 2010 at 2:50 PM, Cameron Kaiser spec...@floodgap.com
 wrote:

 Over the last few minutes, I'm seeing a huge jump in Fail Whales. What
 happened?

 --
  personal:
 http://www.cameronkaiser.com/ --
  Cameron Kaiser * Floodgap Systems * www.floodgap.com *
 ckai...@floodgap.com
 -- Everyone is entitled to my opinion. -- James Carpenter
 -



 --
 “When nothing seems to help, I go look at a stonecutter hammering away
 at his rock perhaps a hundred times without as much as a crack showing in
 it. Yet at the hundred and first blow it will split in two, and I know it
 was not that blow that did it, but all that had gone before.” — Jacob Riis



 --
 Raffi Krikorian
 Twitter Platform Team
 http://twitter.com/raffi



 --
 Abraham Williams | Community Advocate | http://abrah.am
 Project | Out Loud | http://outloud.labs.poseurtech.com
 This email is: [ ] shareable [x] ask first [ ] private.
 Sent from Seattle, WA, United States


 --
 Raffi Krikorian
 Twitter Platform Team
 http://twitter.com/raffi




[twitter-dev] Quite possibly the best tweet I've ever seen.

2010-02-17 Thread Scott Wilcox
Hi folks,

I wouldn't usually post something of this nature but I think you'll agree its 
worth reading. I give you quite possibly the best tweet I've ever seen:

http://twitter.com/lancearmstrong/status/9045920131

Scott.



smime.p7s
Description: S/MIME cryptographic signature


Re: [twitter-dev] Quite possibly the best tweet I've ever seen.

2010-02-17 Thread John Meyer

On 2/17/2010 12:09 PM, Scott Wilcox wrote:

Hi folks,

I wouldn't usually post something of this nature but I think you'll agree its 
worth reading. I give you quite possibly the best tweet I've ever seen:

http://twitter.com/lancearmstrong/status/9045920131

Scott.




Good, although Tila Tequila's tweets are a close second. . . it's kinda 
like watching Cops when they show the DUI offenders arguing with the 
officers that they've had only a couple and can still drive.


Re: [twitter-dev] Quite possibly the best tweet I've ever seen.

2010-02-17 Thread Scott Wilcox
I'll be sure to check them out!

On 17 Feb 2010, at 19:21, John Meyer wrote:

 On 2/17/2010 12:09 PM, Scott Wilcox wrote:
 Hi folks,
 
 I wouldn't usually post something of this nature but I think you'll agree 
 its worth reading. I give you quite possibly the best tweet I've ever seen:
 
 http://twitter.com/lancearmstrong/status/9045920131
 
 Scott.
 
 
 
 Good, although Tila Tequila's tweets are a close second. . . it's kinda like 
 watching Cops when they show the DUI offenders arguing with the officers that 
 they've had only a couple and can still drive.



smime.p7s
Description: S/MIME cryptographic signature


[twitter-dev] rejecting tweets that are greater than 140 characters

2010-02-17 Thread Raffi Krikorian
hi all.

one of the complaints we hear about a lot is that
statuses/updatehttp://apiwiki.twitter.com/Twitter-REST-API-Method:-statuses
updatesilently rejects tweets that are greater than 140 characters
(as well as
silently dropping duplicate tweets, and silently dropping malformed geotags)
-- we have a change coming down the pipeline that will have statuses/update
return a 403 error with the following error message Status is over 140
characters.  we just wanted to give you all a heads up first.  if there is
any question on how to count characters, then refer to
http://apiwiki.twitter.com/FAQ#HowdoInbspcountoutnbsp140charactersnbsp.

after this comes out, we're going to start tackling the other cases
mentioned above.

-- 
Raffi Krikorian
Twitter Platform Team
http://twitter.com/raffi


Re: [twitter-dev] New followers

2010-02-17 Thread Abraham Williams
Followers are ordered by based on when they followed you. The most
recent followers will be at the top of your followers list.

Abraham

On Wed, Feb 17, 2010 at 05:05, kiran kumar kiran.nets...@gmail.com wrote:

 Hai Every One,

 How do i findout new followers from my followers list..Plz help
 me to solve this problem




-- 
Abraham Williams | Community Advocate | http://abrah.am
Project | Out Loud | http://outloud.labs.poseurtech.com
This email is: [ ] shareable [x] ask first [ ] private.
Sent from Seattle, WA, United States


[twitter-dev] Deleting tweets tracked by keyword

2010-02-17 Thread dbasch
I'm using the stream API to track tweets by keyword (filter).
According to the documentation, Streams may also contain status
deletion notices. Clients are urged to honor deletion requests and
discard deleted statuses immediately.

When I try creating and deleting tweets. I always get the new tweets
but never see deletion notices. The tweets do disappear from my
timeline and the search results. Is this a bug or should I expect to
never receive deletion notices through the filter call?

Diego


Re: [twitter-dev] rejecting tweets that are greater than 140 characters

2010-02-17 Thread Cameron Kaiser
 hi all.
 
 one of the complaints we hear about a lot is that
 statuses/updatehttp://apiwiki.twitter.com/Twitter-REST-API-Method:-statuses
 updatesilently rejects tweets that are greater than 140 characters
 (as well as
 silently dropping duplicate tweets, and silently dropping malformed geotags)
 -- we have a change coming down the pipeline that will have statuses/update
 return a 403 error with the following error message Status is over 140
 characters.  we just wanted to give you all a heads up first.  if there is
 any question on how to count characters, then refer to
 http://apiwiki.twitter.com/FAQ#HowdoInbspcountoutnbsp140charactersnbsp.
 
 after this comes out, we're going to start tackling the other cases
 mentioned above.

Is this going to handle UTF-8 properly? There was never any confirmation
whether the UTF-8 characters vs bytes issue is now resolved, and I'd like
to hear definitively there is no issue with 140-CHARACTER tweets anymore.
Right now I continue to limit users to 140 bytes, and my Chinese users are
a bit peeved about that, but I have no proof that their tweets aren't getting
munged down the road.

-- 
 personal: http://www.cameronkaiser.com/ --
  Cameron Kaiser * Floodgap Systems * www.floodgap.com * ckai...@floodgap.com
-- Dalai Lama to hotdog vendor: Make me one with everything. 


[twitter-dev] oauth request token failing

2010-02-17 Thread Berto
Hey guys,

I'm writing a client in java and trying to use oauth to get an access
token.  However, I keep getting an IOException which essentially means
I'm getting an HTTP 401 error back (unauthorized).  I've verified that
my signature algorithm is correct by using some provided examples over
at oauth.net, but nothing seems to be working for me.  Does the
consumer key need an  after it?  I'm using the exact values provided
via the register oauth client page.  Here's a snippet of the code:

HttpURLConnection connection = null;
BufferedReader reader = null;
StringBuilder responseBuilder;
Date date = new Date();
long time = date.getTime();
long timestamp = time / 1000;
Random tmp = new Random();

try {
StringBuilder stuff = new StringBuilder();
stuff.append(encode(oauth_consumer_key));
stuff.append(=);
stuff.append(encode(CONSUMER_KEY));
stuff.append();
stuff.append(encode(oauth_nonce));
stuff.append(=);
stuff.append(encode(Long.toString(timestamp +
tmp.nextInt(1000;
stuff.append();
stuff.append(encode(oauth_signature_method));
stuff.append(=);
stuff.append(encode(HMAC-SHA1));
stuff.append();
stuff.append(encode(oauth_timestamp));
stuff.append(=);
stuff.append(encode(Long.toString(timestamp)));
stuff.append();
stuff.append(encode(oauth_version));
stuff.append(=);
stuff.append(encode(1.0));

StringBuffer base = new
StringBuffer(GET).append()
.append(encode(http://twitter.com/oauth/
request_token)).append();
base.append(encode(stuff.toString()));
String oauthBaseString = base.toString();

String sig = signature(oauthBaseString,
CONSUMER_SECRET);

StringBuilder params = new StringBuilder();
params.append(encode(oauth_consumer_key));
params.append(=\);
params.append(encode(CONSUMER_KEY));
params.append(\, );
params.append(encode(oauth_signature_method));
params.append(=\);
params.append(encode(HMAC-SHA1));
params.append(\, );
params.append(encode(oauth_signature));
params.append(=\);
params.append(encode(sig));
params.append(\, );
params.append(encode(oauth_timestamp));
params.append(=\);
params.append(encode(Long.toString(timestamp)));
params.append(\, );
params.append(encode(oauth_nonce));
params.append(=\);
params.append(encode(Long.toString(timestamp +
tmp.nextInt(1000;
params.append(\, );
params.append(encode(oauth_version));
params.append(=\);
params.append(encode(1.0));
params.append(\);

// Prepare the connection
URL url = new URL(http://twitter.com/oauth/
request_token);
connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod(GET);

connection.setRequestProperty(WWW-Authenticate,
OAuth  + params.toString());

connection.setConnectTimeout(3);
connection.setReadTimeout(3);

// Read the response
   int code = -1;
try {
code = connection.getResponseCode();
} catch (IOException e) {
   e.printStackTrace();
}
reader = new BufferedReader(new
InputStreamReader(connection.getInputStream()));
responseBuilder = new StringBuilder();

String line = null;
while ((line = reader.readLine()) != null) {
responseBuilder.append(line);
}


[twitter-dev] Processing 'dead' users

2010-02-17 Thread Scott Wilcox
Hello,

At tweekly.fm we probably have around 1000-2000 accounts where users haven't 
removed their accounts and have just removed permission for the app to run. 
Once our weekly processes run, they return the expected 'Could not authenticate 
you' errors.

Whats going to be the best way to run through these and remove upon no 
permissions? Run verifyCredentials on each user? Or does anyone have any better 
ideas?

Scott.

smime.p7s
Description: S/MIME cryptographic signature


Re: [twitter-dev] rejecting tweets that are greater than 140 characters

2010-02-17 Thread Raffi Krikorian
as far as we know, we are handing 140 characters properly -- please refer
to http://apiwiki.twitter.com/FAQ#HowdoInbspcountoutnbsp140charactersnbsp.
 that's our methodology for counting characters, and if you think that's
wrong, or if we're not implementing it properly, please let us know.

On Wed, Feb 17, 2010 at 1:32 PM, Cameron Kaiser spec...@floodgap.comwrote:

  hi all.
 
  one of the complaints we hear about a lot is that
  statuses/update
 http://apiwiki.twitter.com/Twitter-REST-API-Method:-statuses
  updatesilently rejects tweets that are greater than 140 characters
  (as well as
  silently dropping duplicate tweets, and silently dropping malformed
 geotags)
  -- we have a change coming down the pipeline that will have
 statuses/update
  return a 403 error with the following error message Status is over 140
  characters.  we just wanted to give you all a heads up first.  if there
 is
  any question on how to count characters, then refer to
  http://apiwiki.twitter.com/FAQ#HowdoInbspcountoutnbsp140charactersnbsp.
 
  after this comes out, we're going to start tackling the other cases
  mentioned above.

 Is this going to handle UTF-8 properly? There was never any confirmation
 whether the UTF-8 characters vs bytes issue is now resolved, and I'd like
 to hear definitively there is no issue with 140-CHARACTER tweets anymore.
 Right now I continue to limit users to 140 bytes, and my Chinese users are
 a bit peeved about that, but I have no proof that their tweets aren't
 getting
 munged down the road.

 --
  personal:
 http://www.cameronkaiser.com/ --
  Cameron Kaiser * Floodgap Systems * www.floodgap.com *
 ckai...@floodgap.com
 -- Dalai Lama to hotdog vendor: Make me one with everything.
 




-- 
Raffi Krikorian
Twitter Platform Team
http://twitter.com/raffi


Re: [twitter-dev] Deleting tweets tracked by keyword

2010-02-17 Thread John Kalucki
In this case, we don't have the original status text to match, so we can't
forward the deletion message to you. In the follow case, I'm pretty sure
that we do send the deletion message, but there are issues with retweet,
etc. etc. So, it varies on fractional streams. Best effort all around.

-John Kalucki
http://twitter.com/jkalucki
Infrastructure, Twitter Inc.




On Wed, Feb 17, 2010 at 1:14 PM, dbasch dba...@gmail.com wrote:

 I'm using the stream API to track tweets by keyword (filter).
 According to the documentation, Streams may also contain status
 deletion notices. Clients are urged to honor deletion requests and
 discard deleted statuses immediately.

 When I try creating and deleting tweets. I always get the new tweets
 but never see deletion notices. The tweets do disappear from my
 timeline and the search results. Is this a bug or should I expect to
 never receive deletion notices through the filter call?

 Diego



Re: [twitter-dev] oauth request token failing

2010-02-17 Thread Ryan Alford
Why are you doing this?

StringBuilder params = new StringBuilder();
   params.append(encode(oauth_consumer_key));
   params.append(=\);
   params.append(encode(CONSUMER_KEY));
   params.append(\, );
   params.append(encode(oauth_signature_method));
   params.append(=\);
   params.append(encode(HMAC-SHA1));
   params.append(\, );
   params.append(encode(oauth_signature));
   params.append(=\);
   params.append(encode(sig));
   params.append(\, );
   params.append(encode(oauth_timestamp));
   params.append(=\);
   params.append(encode(Long.toString(timestamp)));
   params.append(\, );
   params.append(encode(oauth_nonce));
   params.append(=\);
   params.append(encode(Long.toString(timestamp +
tmp.nextInt(1000;
   params.append(\, );
   params.append(encode(oauth_version));
   params.append(=\);
   params.append(encode(1.0));
   params.append(\);

Are you putting quotation marks around the values?

Ryan

On Wed, Feb 17, 2010 at 2:37 PM, Berto mstbe...@gmail.com wrote:

 Hey guys,

 I'm writing a client in java and trying to use oauth to get an access
 token.  However, I keep getting an IOException which essentially means
 I'm getting an HTTP 401 error back (unauthorized).  I've verified that
 my signature algorithm is correct by using some provided examples over
 at oauth.net, but nothing seems to be working for me.  Does the
 consumer key need an  after it?  I'm using the exact values provided
 via the register oauth client page.  Here's a snippet of the code:

 HttpURLConnection connection = null;
BufferedReader reader = null;
StringBuilder responseBuilder;
Date date = new Date();
long time = date.getTime();
long timestamp = time / 1000;
Random tmp = new Random();

try {
StringBuilder stuff = new StringBuilder();
stuff.append(encode(oauth_consumer_key));
stuff.append(=);
stuff.append(encode(CONSUMER_KEY));
stuff.append();
stuff.append(encode(oauth_nonce));
stuff.append(=);
stuff.append(encode(Long.toString(timestamp +
 tmp.nextInt(1000;
stuff.append();
stuff.append(encode(oauth_signature_method));
stuff.append(=);
stuff.append(encode(HMAC-SHA1));
stuff.append();
stuff.append(encode(oauth_timestamp));
stuff.append(=);
stuff.append(encode(Long.toString(timestamp)));
stuff.append();
stuff.append(encode(oauth_version));
stuff.append(=);
stuff.append(encode(1.0));

StringBuffer base = new
 StringBuffer(GET).append()
.append(encode(http://twitter.com/oauth/
 request_token)).append();
base.append(encode(stuff.toString()));
String oauthBaseString = base.toString();

String sig = signature(oauthBaseString,
 CONSUMER_SECRET);

StringBuilder params = new StringBuilder();
params.append(encode(oauth_consumer_key));
params.append(=\);
params.append(encode(CONSUMER_KEY));
params.append(\, );
params.append(encode(oauth_signature_method));
params.append(=\);
params.append(encode(HMAC-SHA1));
params.append(\, );
params.append(encode(oauth_signature));
params.append(=\);
params.append(encode(sig));
params.append(\, );
params.append(encode(oauth_timestamp));
params.append(=\);
params.append(encode(Long.toString(timestamp)));
params.append(\, );
params.append(encode(oauth_nonce));
params.append(=\);
params.append(encode(Long.toString(timestamp +
 tmp.nextInt(1000;
params.append(\, );
params.append(encode(oauth_version));
params.append(=\);
params.append(encode(1.0));
params.append(\);

// Prepare the connection
URL url = new URL(http://twitter.com/oauth/
 request_token);
connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod(GET);

connection.setRequestProperty(WWW-Authenticate,
 OAuth  + params.toString());

connection.setConnectTimeout(3);
connection.setReadTimeout(3);

// Read the response
   

Re: [twitter-dev] oauth request token failing

2010-02-17 Thread Ryan Alford
Can you post the URL with querystring parameters when you make the request?

Ryan

On Wed, Feb 17, 2010 at 4:51 PM, Ryan Alford ryanalford...@gmail.comwrote:

 Why are you doing this?

 StringBuilder params = new StringBuilder();
params.append(encode(oauth_consumer_key));
params.append(=\);
params.append(encode(CONSUMER_KEY));
params.append(\, );
params.append(encode(oauth_signature_method));
params.append(=\);
params.append(encode(HMAC-SHA1));
params.append(\, );
params.append(encode(oauth_signature));
params.append(=\);
params.append(encode(sig));
params.append(\, );
params.append(encode(oauth_timestamp));
params.append(=\);
params.append(encode(Long.toString(timestamp)));
params.append(\, );
params.append(encode(oauth_nonce));
params.append(=\);
params.append(encode(Long.toString(timestamp +
 tmp.nextInt(1000;
params.append(\, );
params.append(encode(oauth_version));
params.append(=\);
params.append(encode(1.0));
params.append(\);

 Are you putting quotation marks around the values?

 Ryan

 On Wed, Feb 17, 2010 at 2:37 PM, Berto mstbe...@gmail.com wrote:

 Hey guys,

 I'm writing a client in java and trying to use oauth to get an access
 token.  However, I keep getting an IOException which essentially means
 I'm getting an HTTP 401 error back (unauthorized).  I've verified that
 my signature algorithm is correct by using some provided examples over
 at oauth.net, but nothing seems to be working for me.  Does the
 consumer key need an  after it?  I'm using the exact values provided
 via the register oauth client page.  Here's a snippet of the code:

 HttpURLConnection connection = null;
BufferedReader reader = null;
StringBuilder responseBuilder;
Date date = new Date();
long time = date.getTime();
long timestamp = time / 1000;
Random tmp = new Random();

try {
StringBuilder stuff = new StringBuilder();
stuff.append(encode(oauth_consumer_key));
stuff.append(=);
stuff.append(encode(CONSUMER_KEY));
stuff.append();
stuff.append(encode(oauth_nonce));
stuff.append(=);
stuff.append(encode(Long.toString(timestamp +
 tmp.nextInt(1000;
stuff.append();
stuff.append(encode(oauth_signature_method));
stuff.append(=);
stuff.append(encode(HMAC-SHA1));
stuff.append();
stuff.append(encode(oauth_timestamp));
stuff.append(=);
stuff.append(encode(Long.toString(timestamp)));
stuff.append();
stuff.append(encode(oauth_version));
stuff.append(=);
stuff.append(encode(1.0));

StringBuffer base = new
 StringBuffer(GET).append()
.append(encode(http://twitter.com/oauth/
 request_token)).append();
base.append(encode(stuff.toString()));
String oauthBaseString = base.toString();

String sig = signature(oauthBaseString,
 CONSUMER_SECRET);

StringBuilder params = new StringBuilder();
params.append(encode(oauth_consumer_key));
params.append(=\);
params.append(encode(CONSUMER_KEY));
params.append(\, );
params.append(encode(oauth_signature_method));
params.append(=\);
params.append(encode(HMAC-SHA1));
params.append(\, );
params.append(encode(oauth_signature));
params.append(=\);
params.append(encode(sig));
params.append(\, );
params.append(encode(oauth_timestamp));
params.append(=\);
params.append(encode(Long.toString(timestamp)));
params.append(\, );
params.append(encode(oauth_nonce));
params.append(=\);
params.append(encode(Long.toString(timestamp +
 tmp.nextInt(1000;
params.append(\, );
params.append(encode(oauth_version));
params.append(=\);
params.append(encode(1.0));
params.append(\);

// Prepare the connection
URL url = new URL(http://twitter.com/oauth/
 request_token);
connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod(GET);


Re: [twitter-dev] Processing 'dead' users

2010-02-17 Thread Michael Steuer
Why not simply delete the user from your db as part of your weekly  
process when you get the Could Not Authentica You error in the first  
place?




On Feb 17, 2010, at 12:11 PM, Scott Wilcox sc...@tig.gr wrote:


Hello,

At tweekly.fm we probably have around 1000-2000 accounts where users  
haven't removed their accounts and have just removed permission for  
the app to run. Once our weekly processes run, they return the  
expected 'Could not authenticate you' errors.


Whats going to be the best way to run through these and remove upon  
no permissions? Run verifyCredentials on each user? Or does anyone  
have any better ideas?


Scott.


Re: [twitter-dev] Global twitter profile image URL

2010-02-17 Thread Abraham Williams
I would image that implementing S3 versioning would be pretty easy and would
rid your systems of a whole bunch of complexity.

http://groups.google.com/group/twitter-development-talk/browse_thread/thread/4faeb3b66ae2e504/

Abraham

On Tue, Feb 16, 2010 at 12:51, Raffi Krikorian ra...@twitter.com wrote:

 probably more than a single day :P

 yes - we have thought about it...  its low on our priority list right now,
 however.


 On Tue, Feb 16, 2010 at 12:17 PM, Peter Kieltyka peter.kielt...@gmail.com
  wrote:

 Hey guys,

 I was wondering if twitter has any plans to offer a global URL to each
 user's profile pic? This would be very handy for third party apps
 built on top of Twitter. Grabbing the profile_image_url which links
 directly to the S3 URL, is susceptible to change and requires a lot of
 effort on the dev's part to make sure its always up to date and
 working.

 Consider something like gravatar.com, but for twitter users. There is
 the the http://tweetimag.es service, which works great, but for
 something so close to the infrastructure I feel this type of service
 should be built and supported by twitter itself.

 I think tweetimag.es has nailed the API as in:

 ie. Hopefully something like:

 http://twimg.com/pkieltyka_m
 http://twimg.com/pkieltyka_n
 http://twimg.com/pkieltyka_b
 http://twimg.com/pkieltyka_o

 if twitter continue's to use S3, it would be very simple to setup a
 CNAME for twimg.com that points to an S3 bucket and each reference to
 a username's profile can be down-cased and append the _SIZE. Simple.

 Should take about a single day to implement this :)

 Cheers.

 Peter




 --
 Raffi Krikorian
 Twitter Platform Team
 http://twitter.com/raffi




-- 
Abraham Williams | Community Advocate | http://abrah.am
Project | Out Loud | http://outloud.labs.poseurtech.com
This email is: [ ] shareable [x] ask first [ ] private.
Sent from Seattle, WA, United States


Re: [twitter-dev] complete Retweet functionality in thirdparty apps

2010-02-17 Thread Abraham Williams
Seems like you should be able to replicate all of the retweet functionality
on twitter.com but it will probably take a lot of API calls.

Abraham

On Tue, Feb 16, 2010 at 12:29, srikanth reddy srikanth.yara...@gmail.comwrote:

 Hi
 Has anybody implemented complete Retweet functionality (retweets by others,
 by you, your retweets) in their app.
 There are couple of issues with retweets api
 see here

 http://groups.google.com/group/twitter-development-talk/browse_thread/thread/fb44e38e034cb9b7?pli=1

 I would like to know if any one has implemented the complete Retweet
 functionality with some work around.

 Thanks
 Srikanth




-- 
Abraham Williams | Community Advocate | http://abrah.am
Project | Out Loud | http://outloud.labs.poseurtech.com
This email is: [ ] shareable [x] ask first [ ] private.
Sent from Seattle, WA, United States


[twitter-dev] Re: oauth request token failing

2010-02-17 Thread Berto
To answer the first email, I was doing that so I could put it in the
request header's authorization field to get this effect:

(Taken from oauth.net)
Authorization: OAuth realm=http://sp.example.com/;,
oauth_consumer_key=0685bd9184jfhq22,
oauth_token=ad180jjd733klru7,
oauth_signature_method=HMAC-SHA1,
oauth_signature=wOJIO9A2W5mFwDgiDvZbTSMK%2FPY%3D,
oauth_timestamp=137131200,
oauth_nonce=4572616e48616d6d65724c61686176,
oauth_version=1.0

Then, I thought it might need to go into the WWW-Authenticate field as
opposed to the Authorization field so I tried that too with no
success.

I've also just tried formatting them as GET parameters and attaching
them to the request URL, but that isn't working either.  It would look
like:

http://twitter.com/oauth/request_token?oauth_consumer_key=valueoauth_signature_method=HMAC-SHA1oauth_timestamp=1266440918oauth_nonce=1266440928oauth_version=1.0oauth_signature=l%2BYDrTyWGpvDu3owDlVQLakzVns%3D

On Feb 17, 3:52 pm, Ryan Alford ryanalford...@gmail.com wrote:
 Can you post the URL with querystring parameters when you make the request?

 Ryan

 On Wed, Feb 17, 2010 at 4:51 PM, Ryan Alford ryanalford...@gmail.comwrote:

  Why are you doing this?

  StringBuilder params = new StringBuilder();
                 params.append(encode(oauth_consumer_key));
                 params.append(=\);
                 params.append(encode(CONSUMER_KEY));
                 params.append(\, );
                 params.append(encode(oauth_signature_method));
                 params.append(=\);
                 params.append(encode(HMAC-SHA1));
                 params.append(\, );
                 params.append(encode(oauth_signature));
                 params.append(=\);
                 params.append(encode(sig));
                 params.append(\, );
                 params.append(encode(oauth_timestamp));
                 params.append(=\);
                 params.append(encode(Long.toString(timestamp)));
                 params.append(\, );
                 params.append(encode(oauth_nonce));
                 params.append(=\);
                 params.append(encode(Long.toString(timestamp +
  tmp.nextInt(1000;
                 params.append(\, );
                 params.append(encode(oauth_version));
                 params.append(=\);
                 params.append(encode(1.0));
                 params.append(\);

  Are you putting quotation marks around the values?

  Ryan

  On Wed, Feb 17, 2010 at 2:37 PM, Berto mstbe...@gmail.com wrote:

  Hey guys,

  I'm writing a client in java and trying to use oauth to get an access
  token.  However, I keep getting an IOException which essentially means
  I'm getting an HTTP 401 error back (unauthorized).  I've verified that
  my signature algorithm is correct by using some provided examples over
  at oauth.net, but nothing seems to be working for me.  Does the
  consumer key need an  after it?  I'm using the exact values provided
  via the register oauth client page.  Here's a snippet of the code:

  HttpURLConnection connection = null;
             BufferedReader reader = null;
             StringBuilder responseBuilder;
             Date date = new Date();
             long time = date.getTime();
             long timestamp = time / 1000;
             Random tmp = new Random();

             try {
                 StringBuilder stuff = new StringBuilder();
                 stuff.append(encode(oauth_consumer_key));
                 stuff.append(=);
                 stuff.append(encode(CONSUMER_KEY));
                 stuff.append();
                 stuff.append(encode(oauth_nonce));
                 stuff.append(=);
                 stuff.append(encode(Long.toString(timestamp +
  tmp.nextInt(1000;
                 stuff.append();
                 stuff.append(encode(oauth_signature_method));
                 stuff.append(=);
                 stuff.append(encode(HMAC-SHA1));
                 stuff.append();
                 stuff.append(encode(oauth_timestamp));
                 stuff.append(=);
                 stuff.append(encode(Long.toString(timestamp)));
                 stuff.append();
                 stuff.append(encode(oauth_version));
                 stuff.append(=);
                 stuff.append(encode(1.0));

                 StringBuffer base = new
  StringBuffer(GET).append()
                 .append(encode(http://twitter.com/oauth/
  request_token)).append();
                 base.append(encode(stuff.toString()));
                 String oauthBaseString = base.toString();

                 String sig = signature(oauthBaseString,
  CONSUMER_SECRET);

                 StringBuilder params = new StringBuilder();
                 params.append(encode(oauth_consumer_key));
                 params.append(=\);
                 params.append(encode(CONSUMER_KEY));
                 params.append(\, );
                 

[twitter-dev] Abraham OAuth and statuses/retweet causing Not found error...

2010-02-17 Thread Fred Garvin
I keep getting this result for statuses/retweet, I even hard coded the
the status ID to be sure it was valid:

stdClass Object ( [request] = /1/statuses/retweet.json [error] = Not
found ) 1

Here is the php I am using (yes it is a good status id):

$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET,
oauth_token, oauth_token_secret);
$result = $connection-post('statuses/retweet', array('id' =
'9212486431'));

Any insight is appreciated.


Re: [twitter-dev] rejecting tweets that are greater than 140 characters

2010-02-17 Thread Scott Wilcox
Thats brilliant, I've been wanting this for a long time now.

On 17 Feb 2010, at 19:48, Raffi Krikorian wrote:

 hi all.
 
 one of the complaints we hear about a lot is that statuses/update silently 
 rejects tweets that are greater than 140 characters (as well as silently 
 dropping duplicate tweets, and silently dropping malformed geotags) -- we 
 have a change coming down the pipeline that will have statuses/update return 
 a 403 error with the following error message Status is over 140 characters. 
  we just wanted to give you all a heads up first.  if there is any question 
 on how to count characters, then refer to 
 http://apiwiki.twitter.com/FAQ#HowdoInbspcountoutnbsp140charactersnbsp.
 
 after this comes out, we're going to start tackling the other cases mentioned 
 above.



smime.p7s
Description: S/MIME cryptographic signature


Re: [twitter-dev] Re: oauth request token failing

2010-02-17 Thread Ryan Alford
Your querystring parameters are in the wrong order.  You have the
oauth_nonce AFTER oauth_timestamp.  It needs to be before it.  The
parameters must be in order.

Ryan

Sent from my DROID

On Feb 17, 2010 6:18 PM, Berto mstbe...@gmail.com wrote:

To answer the first email, I was doing that so I could put it in the
request header's authorization field to get this effect:

(Taken from oauth.net)
Authorization: OAuth realm=http://sp.example.com/;,
   oauth_consumer_key=0685bd9184jfhq22,
   oauth_token=ad180jjd733klru7,
   oauth_signature_method=HMAC-SHA1,
   oauth_signature=wOJIO9A2W5mFwDgiDvZbTSMK%2FPY%3D,
   oauth_timestamp=137131200,
   oauth_nonce=4572616e48616d6d65724c61686176,
   oauth_version=1.0

Then, I thought it might need to go into the WWW-Authenticate field as
opposed to the Authorization field so I tried that too with no
success.

I've also just tried formatting them as GET parameters and attaching
them to the request URL, but that isn't working either.  It would look
like:

http://twitter.com/oauth/request_token?oauth_consumer_key=
valueoauth_signature_method=HMAC-SHA1oauth_timestamp=1266440918oauth_nonce=1266440928oauth_version=1.0oauth_signature=l%2BYDrTyWGpvDu3owDlVQLakzVns%3D


On Feb 17, 3:52 pm, Ryan Alford ryanalford...@gmail.com wrote:
 Can you post the URL with querys...
 On Wed, Feb 17, 2010 at 4:51 PM, Ryan Alford ryanalford...@gmail.com
wrote:


  Why are you doing this?

  StringBuilder params = new StringBuilder();
  ...

  On Wed, Feb 17, 2010 at 2:37 PM, Berto mstbe...@gmail.com wrote:

  Hey guys,

  I'm w...


[twitter-dev] favorites paging limit?

2010-02-17 Thread TJ Luoma
http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-favorites
doesn't mention any limits to the page parameter.

Through trial and error I figured out that

curl --location --referer ;auto -D - -s --netrc
'http://twitter.com/favorites.xml?page=175'

was too much but

curl --location --referer ;auto -D - -s --netrc
'http://twitter.com/favorites.xml?page=174'

seems to work.

At 20 per page, that works out to 3,480.

TjL


[twitter-dev] Re: OAuth Broken - Now Asking Users for PIN

2010-02-17 Thread DenVog
So Raffi. Can you help us out with an example of how we should be
handling the callback URL? I've done quite a bit of searching, but am
not seeing that it is documented very well or finding any samples.
Thanks.

On Feb 16, 5:45 pm, mthistle mthis...@gmail.com wrote:
 Hi DenVog,

 First, cool, you quoted my post at droolfactory.

 Raffi: Yes, the Twitter-OAuth-iPhone code 
 fromhttp://github.com/bengottlieb/Twitter-OAuth-iPhoneis using page
 scraping and javascript to pull out the PIN.  This is the code that
 DenVog is referencing from my post.

 The better way to do this I have been informed is to use the URL
 callback scheme and have the application handle a unique URL which
 Twitter would call.  I have not found code for this or made the
 changes yet but it sounds fairly easy to implement.

 --
 Mark Thistlehttp://droolfactory.blogspot.com/



Re: [twitter-dev] Abraham OAuth and statuses/retweet causing Not found error...

2010-02-17 Thread Abraham Williams
Try $result = $connection-post('statuses/retweet/'9212486431');

Twitter might not recognize
http://api.twitter.com/1/statuses/retweet.json?id=status_id

Let me know how it goes.
Abraham

On Wed, Feb 17, 2010 at 14:13, Fred Garvin i...@windpath.com wrote:

 I keep getting this result for statuses/retweet, I even hard coded the
 the status ID to be sure it was valid:

 stdClass Object ( [request] = /1/statuses/retweet.json [error] = Not
 found ) 1

 Here is the php I am using (yes it is a good status id):

 $connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET,
 oauth_token, oauth_token_secret);
 $result = $connection-post('statuses/retweet', array('id' =
 '9212486431'));

 Any insight is appreciated.




-- 
Abraham Williams | Community Advocate | http://abrah.am
Project | Out Loud | http://outloud.labs.poseurtech.com
This email is: [ ] shareable [x] ask first [ ] private.
Sent from Seattle, WA, United States


[twitter-dev] Whats the best practice for caching data?

2010-02-17 Thread Dmitri Snytkine
Hello!
I am just starting developing my app. I got the oAuth thing to work
using pecl oauth, which is great and was easy.

Now the question: What should I do after user is logged via oAuth, and
after I got array of user data from this url:
https://twitter.com/account/verify_credentials.json

I have 2 choices: store the data in the database and put cookie in
user's browser and next time user visits, I can just pull the
username, name, etc from my database

Or I can use user's access token/secret that I also store in database
to get the fresh data from Twitter.

Getting fresh data will guarantee that I have user's latest color
settings, background, avatar, description
But I may run over 150 requests per hour very easily.

How is this usually done by other app developers? What's the best
practice for synchronizing user's settings with Twitter?


[twitter-dev] Re: oauth request token failing

2010-02-17 Thread Berto
Nevermind, just re-read the normalizing parameters part of the spec.
I'll try it out tomorrow.

Thanks.

On Feb 17, 5:27 pm, Ryan Alford ryanalford...@gmail.com wrote:
 Your querystring parameters are in the wrong order.  You have the
 oauth_nonce AFTER oauth_timestamp.  It needs to be before it.  The
 parameters must be in order.

 Ryan

 Sent from my DROID

 On Feb 17, 2010 6:18 PM, Berto mstbe...@gmail.com wrote:

 To answer the first email, I was doing that so I could put it in the
 request header's authorization field to get this effect:

 (Taken from oauth.net)
 Authorization: OAuth realm=http://sp.example.com/;,
                oauth_consumer_key=0685bd9184jfhq22,
                oauth_token=ad180jjd733klru7,
                oauth_signature_method=HMAC-SHA1,
                oauth_signature=wOJIO9A2W5mFwDgiDvZbTSMK%2FPY%3D,
                oauth_timestamp=137131200,
                oauth_nonce=4572616e48616d6d65724c61686176,
                oauth_version=1.0

 Then, I thought it might need to go into the WWW-Authenticate field as
 opposed to the Authorization field so I tried that too with no
 success.

 I've also just tried formatting them as GET parameters and attaching
 them to the request URL, but that isn't working either.  It would look
 like:

 http://twitter.com/oauth/request_token?oauth_consumer_key=
 valueoauth_signature_method=HMAC-SHA1oauth_timestamp=1266440918oauth_nonce=1266440928oauth_version=1.0oauth_signature=l%2BYDrTyWGpvDu3owDlVQLakzVns%3D

 On Feb 17, 3:52 pm, Ryan Alford ryanalford...@gmail.com wrote:

  Can you post the URL with querys...
  On Wed, Feb 17, 2010 at 4:51 PM, Ryan Alford ryanalford...@gmail.com
 wrote:

   Why are you doing this?

   StringBuilder params = new StringBuilder();
               ...
   On Wed, Feb 17, 2010 at 2:37 PM, Berto mstbe...@gmail.com wrote:

   Hey guys,

   I'm w...


Re: [twitter-dev] Mentions with changed screen name?

2010-02-17 Thread Daniel Peebles
Done! It's at http://code.google.com/p/twitter-api/issues/detail?id=1459

Thanks again for the great service :)
Dan

On Mon, Feb 15, 2010 at 5:24 PM, Raffi Krikorian ra...@twitter.com wrote:

 i don't think there is a way to do this currently.

 could i ask a favor and ask you to note this feature request on the google
 code tracker?


 On Sun, Feb 14, 2010 at 12:21 PM, Daniel Peebles pumpkin...@gmail.comwrote:

 So in general it's not possible to see that for example that old tweets
 mentioning e.g., @pumpkingod (my old screen name) are actually referring to
 user id 13447902 whose current screen name is @copumpkin? Are there any
 plans to add a way to look those up?

 Thanks,
 Daniel



 On Sat, Feb 13, 2010 at 5:18 PM, Raffi Krikorian ra...@twitter.comwrote:

 there isn't an API call that will give you an old screen name of a user.
  mentions are computed both at posting time, and by doing textual lookups
 depending on the situation.


 On Sat, Feb 13, 2010 at 11:46 AM, Daniel Peebles 
 pumpkin...@gmail.comwrote:

 I've been trying to extract mentions from some historical tweets I
 collected (some a couple of years old) and as the mentions are textual, 
 some
 of the screen names have changed. Is there any way to look up a user id
 based on an old screen name of that user? Does twitter even maintain that
 information? Do the API methods for mentions simply extract possible
 mentions at posting time or are they doing a textual lookup as well?

 Thanks,
 Daniel




 --
 Raffi Krikorian
 Twitter Platform Team
 http://twitter.com/raffi





 --
 Raffi Krikorian
 Twitter Platform Team
 http://twitter.com/raffi



Re: [twitter-dev] Re: oauth request token failing

2010-02-17 Thread Berto
I thought that was only for the signature which is in the right
order?

Ryan Alford wrote:
 Your querystring parameters are in the wrong order.  You have the
 oauth_nonce AFTER oauth_timestamp.  It needs to be before it.  The
 parameters must be in order.

 Ryan

 Sent from my DROID

 On Feb 17, 2010 6:18 PM, Berto mstbe...@gmail.com wrote:

 To answer the first email, I was doing that so I could put it in the
 request header's authorization field to get this effect:

 (Taken from oauth.net)
 Authorization: OAuth realm=http://sp.example.com/;,
oauth_consumer_key=0685bd9184jfhq22,
oauth_token=ad180jjd733klru7,
oauth_signature_method=HMAC-SHA1,
oauth_signature=wOJIO9A2W5mFwDgiDvZbTSMK%2FPY%3D,
oauth_timestamp=137131200,
oauth_nonce=4572616e48616d6d65724c61686176,
oauth_version=1.0

 Then, I thought it might need to go into the WWW-Authenticate field as
 opposed to the Authorization field so I tried that too with no
 success.

 I've also just tried formatting them as GET parameters and attaching
 them to the request URL, but that isn't working either.  It would look
 like:

 http://twitter.com/oauth/request_token?oauth_consumer_key=
 valueoauth_signature_method=HMAC-SHA1oauth_timestamp=1266440918oauth_nonce=1266440928oauth_version=1.0oauth_signature=l%2BYDrTyWGpvDu3owDlVQLakzVns%3D


 On Feb 17, 3:52 pm, Ryan Alford ryanalford...@gmail.com wrote:
  Can you post the URL with querys...
  On Wed, Feb 17, 2010 at 4:51 PM, Ryan Alford ryanalford...@gmail.com
 wrote:

 
   Why are you doing this?
 
   StringBuilder params = new StringBuilder();
   ...

   On Wed, Feb 17, 2010 at 2:37 PM, Berto mstbe...@gmail.com wrote:
 
   Hey guys,
 
   I'm w...


Re: [twitter-dev] rejecting tweets that are greater than 140 characters

2010-02-17 Thread Cameron Kaiser
 as far as we know, we are handing 140 characters properly -- please refer
 to http://apiwiki.twitter.com/FAQ#HowdoInbspcountoutnbsp140charactersnbsp.
  that's our methodology for counting characters, and if you think that's
 wrong, or if we're not implementing it properly, please let us know.

I'll take that as a 'yes' and go ahead and unlock the 140 char code. :)
Thanks for the response.

-- 
 personal: http://www.cameronkaiser.com/ --
  Cameron Kaiser * Floodgap Systems * www.floodgap.com * ckai...@floodgap.com
-- The only thing to fear is fearlessness -- R. E. M. -


[twitter-dev] Twitter search history

2010-02-17 Thread Mark
Hi -

I'm trying to figure out how much history search.twitter.com gives
access to. For instance, this search query:

http://search.twitter.com/search.json?q=barack+obamasince=2008-11-03until=2008-11-05

Which bounds election day 2008, returns no results. . Other variants
on the query, such as substituting vote for barack+obama, also
don't return results. It seems like even though 2008 is offered as a
choice in the Advanced Search dropdown menu, there's no data there for
this period.

Is there some time threshold past which the search API doesn't give
access to the historical data? And if so, is there any way to have
access to that data?

Thanks,
Mark


Re: [twitter-dev] Whats the best practice for caching data?

2010-02-17 Thread Abraham Williams
Account/verify_credentials does not actually count against your rate limit
so you can call that each time a user signs in.

In general you should cache any data that takes a long time to poll from the
API or anything that does not change often.

Abraham

On Wed, Feb 17, 2010 at 17:52, Dmitri Snytkine d.snytk...@gmail.com wrote:

 Hello!
 I am just starting developing my app. I got the oAuth thing to work
 using pecl oauth, which is great and was easy.

 Now the question: What should I do after user is logged via oAuth, and
 after I got array of user data from this url:
 https://twitter.com/account/verify_credentials.json

 I have 2 choices: store the data in the database and put cookie in
 user's browser and next time user visits, I can just pull the
 username, name, etc from my database

 Or I can use user's access token/secret that I also store in database
 to get the fresh data from Twitter.

 Getting fresh data will guarantee that I have user's latest color
 settings, background, avatar, description
 But I may run over 150 requests per hour very easily.

 How is this usually done by other app developers? What's the best
 practice for synchronizing user's settings with Twitter?




-- 
Abraham Williams | Community Advocate | http://abrah.am
Project | Out Loud | http://outloud.labs.poseurtech.com
This email is: [ ] shareable [x] ask first [ ] private.


[twitter-dev] Search API and total number of matches

2010-02-17 Thread eco_bach
Hi
You determine the number of tweets per age using the 'rpp' query
parameter, with a maximum of I believe, 100 tweets per page, but is
there also a way to determine the total number of 'matches' for a
given search query?


[twitter-dev] Re: Twitter search history

2010-02-17 Thread eco_bach
Hi mark
Good question and I haven't been able to get a definitive answer.
Originally I thought it should be possible to search back to twitter's
birth. Recent tests with the Search API though I haven't been able to
go back further than 1 week from today's  date. If you DO find an
answer, would appreciate if you pass along


Re: [twitter-dev] Re: Twitter search history

2010-02-17 Thread Abraham Williams
http://apiwiki.twitter.com/Things-Every-Developer-Should-Know#6Therearepaginationlimits

Abraham

On Wed, Feb 17, 2010 at 19:26, eco_bach bac...@gmail.com wrote:

 Hi mark
 Good question and I haven't been able to get a definitive answer.
 Originally I thought it should be possible to search back to twitter's
 birth. Recent tests with the Search API though I haven't been able to
 go back further than 1 week from today's  date. If you DO find an
 answer, would appreciate if you pass along




-- 
Abraham Williams | Community Advocate | http://abrah.am
Project | Out Loud | http://outloud.labs.poseurtech.com
This email is: [ ] shareable [x] ask first [ ] private.
Sent from Seattle, WA, United States


Re: [twitter-dev] Search API and total number of matches

2010-02-17 Thread Abraham Williams
Nope. You can iterate and count them yourselves but you will be limited to
the results Search returns.

Abraham

On Wed, Feb 17, 2010 at 19:12, eco_bach bac...@gmail.com wrote:

 Hi
 You determine the number of tweets per age using the 'rpp' query
 parameter, with a maximum of I believe, 100 tweets per page, but is
 there also a way to determine the total number of 'matches' for a
 given search query?




-- 
Abraham Williams | Community Advocate | http://abrah.am
Project | Out Loud | http://outloud.labs.poseurtech.com
This email is: [ ] shareable [x] ask first [ ] private.
Sent from Seattle, WA, United States


[twitter-dev] inconsistency in User Icon pixel sizes and file formats.

2010-02-17 Thread eco_bach
Hi
In building a twitter search application I was surprised to find out
that there is a inconsistency in User Icon actual pixel sizes.
Is there any reason for this?
Why can't Twitter automatically resize image icons if they are too
large?
And better yet, convert the occasional .bmp format into .jpg?


Re: [twitter-dev] Re: oauth request token failing

2010-02-17 Thread Ryan Alford
You order all parameters EXCEPT the signature, then create the signature,
then append the signature to the end.  All other parameters should be in
order.

Ryan

On Wed, Feb 17, 2010 at 6:42 PM, Berto mstbe...@gmail.com wrote:

 I thought that was only for the signature which is in the right
 order?

 Ryan Alford wrote:
  Your querystring parameters are in the wrong order.  You have the
  oauth_nonce AFTER oauth_timestamp.  It needs to be before it.  The
  parameters must be in order.
 
  Ryan
 
  Sent from my DROID
 
  On Feb 17, 2010 6:18 PM, Berto mstbe...@gmail.com wrote:
 
  To answer the first email, I was doing that so I could put it in the
  request header's authorization field to get this effect:
 
  (Taken from oauth.net)
  Authorization: OAuth realm=http://sp.example.com/;,
 oauth_consumer_key=0685bd9184jfhq22,
 oauth_token=ad180jjd733klru7,
 oauth_signature_method=HMAC-SHA1,
 oauth_signature=wOJIO9A2W5mFwDgiDvZbTSMK%2FPY%3D,
 oauth_timestamp=137131200,
 oauth_nonce=4572616e48616d6d65724c61686176,
 oauth_version=1.0
 
  Then, I thought it might need to go into the WWW-Authenticate field as
  opposed to the Authorization field so I tried that too with no
  success.
 
  I've also just tried formatting them as GET parameters and attaching
  them to the request URL, but that isn't working either.  It would look
  like:
 
  http://twitter.com/oauth/request_token?oauth_consumer_key=
 
 valueoauth_signature_method=HMAC-SHA1oauth_timestamp=1266440918oauth_nonce=1266440928oauth_version=1.0oauth_signature=l%2BYDrTyWGpvDu3owDlVQLakzVns%3D
 
 
  On Feb 17, 3:52 pm, Ryan Alford ryanalford...@gmail.com wrote:
   Can you post the URL with querys...
   On Wed, Feb 17, 2010 at 4:51 PM, Ryan Alford ryanalford...@gmail.com
  wrote:
 
  
Why are you doing this?
  
StringBuilder params = new StringBuilder();
...
 
On Wed, Feb 17, 2010 at 2:37 PM, Berto mstbe...@gmail.com wrote:
  
Hey guys,
  
I'm w...



[twitter-dev] Re: Twitter search history

2010-02-17 Thread Mark
Abraham, thanks for the pointer.

From the wiki, it appears that the search should return up to 1500
results; if you don't restrict the limit by specifying rpp and page,
then it might error out.

Thus this should yield good results:

http://search.twitter.com/search.json?q=barack+obamasince=2008-11-03until=2008-11-05page=10rpp=15

Because page*rpp = 150, which is far short of the limit.

Instead, I get this:

{results:[],max_id:992444080,since_id:
986862019,previous_page:?page=9max_id=992444080q=barack+obama
+since%3A2008-11-03+until%3A2008-11-05,refresh_url:?
since_id=992444080q=barack+obama+since%3A2008-11-03+until
%3A2008-11-05,total:135,results_per_page:15,page:
10,completed_in:0.059496,query:barack+obama+since
%3A2008-11-03+until%3A2008-11-05}

Which appears to suggest that the query is going through but that
nothing is being returned. Thus it doesn't appear that the null result
is being caused by the query limits. Or am I misreading this output?

Thanks for everyone's responses.
Mark

On Feb 17, 7:33 pm, Abraham Williams 4bra...@gmail.com wrote:
 http://apiwiki.twitter.com/Things-Every-Developer-Should-Know#6Therea...

 Abraham

 On Wed, Feb 17, 2010 at 19:26, eco_bach bac...@gmail.com wrote:
  Hi mark
  Good question and I haven't been able to get a definitive answer.
  Originally I thought it should be possible to search back to twitter's
  birth. Recent tests with the Search API though I haven't been able to
  go back further than 1 week from today's  date. If you DO find an
  answer, would appreciate if you pass along

 --
 Abraham Williams | Community Advocate |http://abrah.am
 Project | Out Loud |http://outloud.labs.poseurtech.com
 This email is: [ ] shareable [x] ask first [ ] private.
 Sent from Seattle, WA, United States