Re: [twitter-dev] oAuth new stuff?

2009-12-30 Thread Raffi Krikorian

 i understand that you have to tow the line. i agree with it — at least in
 principle. i like oauth. i understand it. i *want* to put it in my app.
 aside from my desktop client, i released an open source oAuth solution:
 http://thurly.net//5nl

 yet, of the prominent mac clients (tweetie, twitteriffic, socialite, beak,
 bluebird, kiwi) only one is currently using oAuth. the reasons are painfully
 obvious and have been discussed here and elsewhere ad nauseum:

 http://groups.google.com/group/twitter-development-talk/search?hl=engroup=twitter-development-talkq=oauth+desktopqt_g=Search+this+group


honestly, i actually resent the i understand that you have to tow the line
statement.

i feel there is a lack of user education going on to explain to users why
oauth is actually better for the user -- for a list of said reasons, please
see http://apiwiki.twitter.com/OAuth+Example+-+Ruby.  additionally, i
understand that simply putting up a dialog box with two text input fields is
easier to code than writing software that manipulates a browser, and that is
why a lot of applications do that.

as i see it, and having written software against the Twitter APIs (ate our
own dogfood), what's missing are the following two things (please add to the
list):

   - when using oauth, a good way to integrate with third party services
   that also use twitter credentials (yfrog, twitpic, URL shorteners, etc.) --
   this is delegation
  -
  
http://groups.google.com/group/twitter-development-talk/browse_thread/thread/ac563255efcb/951ee32ec9cea3a8?lnk=gstq=delegation#951ee32ec9cea3a8
  - http://twitter.com/twitterapi/status/6743938510
   - a good workflow for desktop apps -- specifically, desktop applications
   that have access to a browser.  i am -not- talking about rich environments
   that do not have access to a general purpose browser (set top boxes, game
   consoles, etc.)

what i would rather see, and what i'm interested in fixing, are those two.

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


Re: [twitter-dev] Re: Streaming API Client DNS TTL issue

2009-12-30 Thread John Kalucki
Since curl exits each time, it has no choice but to re-resolve. But,
your OS may or may not. Chances are that you are OK, but the way to
know for sure is to test as suggested.

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



On Tue, Dec 29, 2009 at 9:47 PM, M. Edward (Ed) Borasky
zzn...@gmail.com wrote:
 I'm using the command-line curl as a client - will it do this, or do
 I need to go to a lower-level library-based connection strategy?

 On Dec 29, 9:33 am, John Kalucki jkalu...@gmail.com wrote:
 I've noticed a handful of Twitter Streaming API clients that are not
 honoring the DNS Time To Live (TTL). If your client is currently
 connected to 128.121.146.231, you certainly have an issue with
 ignoring the TTL. If you have restarted your client in the last few
 weeks, but are connected to another IP address, you may or may not
 have this issue. Clients ignoring DNS TTL will be subject to
 unpredictable outages as we shift load between clusters.

 In any case, the prudent developer would test the client stack against
 a test DNS record and validate that the TTL is honored correctly.

 I added the following to the Wiki:

 
 Test that your client process honors the DNS Time To live (TTL). Some
 stacks will cache a resolved address for the duration of the process
 and will not pick up DNS changes within the proscribed TTL. Such
 aggressive caching will lead to service disruptions on your client as
 Twitter shifts load between IP addresses.
 

 -John Kaluckihttp://twitter.com/jkalucki
 Services, Twitter Inc.



[twitter-dev] Re: suddenly lists of a certain account became undeletable

2009-12-30 Thread Yusuke
Done.

http://code.google.com/p/twitter-api/issues/detail?id=1327

Best,
Yusuke

On 12月27日, 午前7:20, Abraham Williams 4bra...@gmail.com wrote:
 There does not seem to be an issue open for it though a number of people
 have talked about it on the list. Go ahead an create a ticket:

 http://code.google.com/p/twitter-api/issues/entry





 On Sat, Dec 26, 2009 at 11:13, Yusuke Yamamoto yus...@mac.com wrote:
  Hi,

  I'm now playing with Twitter4J and my test account's lists become
  undeletable.

  The account used for the test is twit4j.
  And the test case for creating/deleting lists used to pass.
  But suddenly its lists became undeletable both from the Web interface and
  the API, and my test case doesn't pass.

 http://yusuke.homeip.net/hudson/job/Twitter4J/net.homeip.yusuke$twitt...
  ?

  Is it a known issue?

  I'm attaching a debug log from Twitter4J.
  The sequence is as follows:
  1. get the all lists owned by twit4j
  2. delete them all
  3. create a private list named api3 is email
  - the API returns 403, saying that A user can only have 20 lists.

  Regards,
  --
  Yusuke Yamamoto
  yus...@mac.com

  this email is: [x] bloggable/tweetable [ ] ask first [ ] private
  follow me on :http://twitter.com/yusukeyamamoto
  subscribe me at :http://yusuke.homeip.net/blog/

 --
 Abraham Williams | Awesome Lists |http://awesomeli.st
 Project | Intersect |http://intersect.labs.poseurtech.com
 Hacker |http://abrah.am|http://twitter.com/abraham
 This email is: [ ] shareable [x] ask first [ ] private.
 Sent from Bloomington, IN, United States


Re: [twitter-dev] Re: Streaming API Client DNS TTL issue

2009-12-30 Thread Rushikesh Bhanage
  Dear Sir,

 I need followers count, I get it exactly if it is below 100, but if it
is above 100, getting count as 100 only, instead of exact figure, what
should I do?

Thanking You already.


Rushikesh


Re: [twitter-dev] oAuth new stuff?

2009-12-30 Thread Xavier Grosjean
Yoono desktop application (and firefox add-on) is using OAuth too.

2009/12/30 Isaiah supp...@yourhead.com


 i understand that you have to tow the line. i agree with it — at least in
 principle. i like oauth. i understand it. i *want* to put it in my app.
 aside from my desktop client, i released an open source oAuth solution:
 http://thurly.net//5nl

 yet, of the prominent mac clients (tweetie, twitteriffic, socialite, beak,
 bluebird, kiwi) only one is currently using oAuth. the reasons are painfully
 obvious and have been discussed here and elsewhere ad nauseum:

 http://groups.google.com/group/twitter-development-talk/search?hl=engroup=twitter-development-talkq=oauth+desktopqt_g=Search+this+group

 i suspect that other desktop app devs feel like i do: that the announced
 oauth addendum was a sea change that looked like a realistic way forward. i
 was ready to hi-five the first person i saw when i read about it:

 http://groups.google.com/group/twitter-development-talk/msg/18b38db599f6ad98?hl=en

 i'm not asking for anything new or different from what has already been
 announced. i was just hoping for a bit more detail, that's all.

 isaiah

 On Dec 29, 2009, at 3:19 PM, Raffi Krikorian wrote:

  if your application has access to a web browser, then i would strongly
 suggest that you implement a workflow where your user goes to a
 twitter.com page -- this workflow is intended to protect the usernames and
 passwords of Twitter users because they can trust that an unknown app does
 not have access to their passwords.
 
  On Tue, Dec 29, 2009 at 2:31 PM, Isaiah Carew isa...@mac.com wrote:
 
  bummer.
 
  i don't mean to be rude, but it sure feels like there is a large gap
 between the PR announcement a couple weeks ago and the reality on the
 ground.  i'm trying to be patient in letting the info trickle down.  i guess
 i'll ask again in a couple weeks?
 
  twiddling thumbs
  waiting
  hmmm  hmm hmmm
 
  until then, my app is limping along with basic auth without attribution.
 
  isaiah
 
  On Dec 29, 2009, at 1:30 PM, Raffi Krikorian wrote:
 
  i don't know.  sorry that i forgot to address your question.
 
  On Tue, Dec 29, 2009 at 1:18 PM, Isaiah Carew isa...@mac.com wrote:
 
  and how 'bout that off topic question?
 
  a non-silent-treatment sort of answer would be really great -- even if
 it's i can't tell you or i don't know or that's on a need to know basis
 and you don't need to know. or you want the truth, you can't handle the
 truth! or whatever.
 
  my biggest concern is that it won't come before the deprecation of oAuth
 -- and I'll have to implement a pin bases solution in the interim, then rip
 that out, then implement the new flow if/when it's finally included in the
 twitter api.  if that's the case, then i'm going to need to budget some more
 $$ for this effort.
 
  i'm just looking at what sort of effort and money i'm going to have to
 spend on this in the next six months.
 
  thanks,
  isaiah
 
 
  On Dec 29, 2009, at 1:06 PM, Raffi Krikorian wrote:
 
  Also, off topic:
  Any news on when we can expect the new oAuth with username/password
 flow to make its way into the API?  If you can't let me know, or you don't
 know, I understand, but it would be good to hear whatever the case.
 
  Thanks,
  Isaiah
 
 
 
 
  --
  Raffi Krikorian
  Twitter Platform Team
  http://twitter.com/raffi
 
 
 
 
  --
  Raffi Krikorian
  Twitter Platform Team
  http://twitter.com/raffi




[twitter-dev] sometimes got 401 unauthenticated error

2009-12-30 Thread dimas
My application authenticating user via web login, then save the needed
credential and running API call in background task using cron.
Sometimes the requests return a 401 unauthenticated error, and
sometimes
they don't.
I readed on this issue:
http://code.google.com/p/twitter-api/issues/detail?id=1052can=1q=%22401%22colspec=ID%20Stars%20Type%20Status%20Priority%20Owner%20Summary%20Opened%20Modified%20Component

and the last post says:
This was the result of an issue with an experimental service we were
testing. The bug should be resolved.

Is it the issue of experimental service testing??


I'm not saving the log, but the error is around the verify
credentials on
the background task. And get access token on web login when
redirecting
back to my application.


[twitter-dev] Re: [twitter-api-announce] Changes to search results for trending topics

2009-12-30 Thread Harshad RJ
Hi Ryan,

Digging up a rather old announcement from you, because this is exactly what
I was looking for. But I am not sure if a special parameter is required to
enable trend filtering.

I just now added a trends feature in my app, and thus noticed that the
search results for trends still shows some spam.


   - Is there a special parameter to indicate that the search is for a trend
   and not just another keyword search?
   - Does it make sense to have a follower_count parameter to the search
   API? When specified, only tweets from people having followers  than
   specified parameter will be shown. This could be useful for non-trending
   keywords as well.

cheers,
Harshad

On Fri, Nov 6, 2009 at 6:02 AM, Ryan Sarver rsar...@twitter.com wrote:


 Today on the Twitter Blog we announced that we will be changing search
 results for trending topics to improve the quality. It used to be that
 trends were a great way to quickly see what was going on on Twitter,
 but they have begun to get fairly noisy due to the sheer volume of
 tweets. We wanted to improve that experience and will start returning
 what we think are the best results. This doesn't mean that tweets are
 getting dropped from the index, instead we are just making intelligent
 decisions on which ones to return for searches on popular topics,
 beginning with trending topics. If you make a more specific search,
 you can still get to all the tweets.

 So for you, the developer, this means that if you will see better
 quality results over the search API for trends, but you won't be
 getting every tweet that matched the search term. If you still do want
 to get every tweet matching a trend, we recommend you check out the
 Streaming API (http://apiwiki.twitter.com/Streaming-API-Documentation).
 In the end, this is a change that is good for developers and
 end-users, but we wanted to notify you as you might be seeing some
 slightly different behavior via the API.

 Please let us know if you have any questions -- we are happy to answer.

 Ryan

 --~--~-~--~~~---~--~~
 Twitter API documentation and resources: http://apiwiki.twitter.com
 API updates via Twitter: http://twitter.com/twitterapi
 Change your membership to this group:
 http://groups.google.com/group/twitter-api-announce?hl=en
 -~--~~~~--~~--~--~---




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


Re: [twitter-dev] Re: Streaming API Client DNS TTL issue

2009-12-30 Thread John Kalucki
Rushikesh,

Your request doesn't make sense to me in the context of the streaming api.

I'd suggest starting a new thread, document what actions you take
(URLs, parameters, etc.), a summary the response you receive, and
describe response you would like to get.

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



On Tue, Dec 29, 2009 at 10:25 PM, Rushikesh Bhanage
rishibhan...@gmail.com wrote:
   Dear Sir,

  I need followers count, I get it exactly if it is below 100, but if it
 is above 100, getting count as 100 only, instead of exact figure, what
 should I do?

 Thanking You already.


 Rushikesh



Re: [twitter-dev] oAuth new stuff?

2009-12-30 Thread Abraham Williams
On Wed, Dec 30, 2009 at 07:53, Raffi Krikorian ra...@twitter.com wrote:

 a good workflow for desktop apps -- specifically, desktop applications that
 have access to a browser.  i am -not- talking about rich environments that
 do not have access to a general purpose browser (set top boxes, game
 consoles, etc.)


You don't think either the PIN flow or applications registering as protocol
handlers work well enough?

-- 
Abraham Williams | Blog | http://the.hackerconundrum.com
Project | Intersect | http://intersect.labs.poseurtech.com
Hacker | http://abrah.am | http://twitter.com/abraham
This email is: [ ] shareable [x] ask first [ ] private.
Sent from Madison, WI, United States


Re: [twitter-dev] oAuth new stuff?

2009-12-30 Thread Raffi Krikorian
i think they both technically are great solutions - protocol handlers work
_great_ on platforms that support them.  and i think it makes for a great
UX.


 On Wed, Dec 30, 2009 at 07:53, Raffi Krikorian ra...@twitter.com wrote:

 a good workflow for desktop apps -- specifically, desktop applications
 that have access to a browser.  i am -not- talking about rich environments
 that do not have access to a general purpose browser (set top boxes, game
 consoles, etc.)


 You don't think either the PIN flow or applications registering as protocol
 handlers work well enough?

 --
 Abraham Williams | Blog | http://the.hackerconundrum.com
 Project | Intersect | http://intersect.labs.poseurtech.com
 Hacker | http://abrah.am | http://twitter.com/abraham
 This email is: [ ] shareable [x] ask first [ ] private.
 Sent from Madison, WI, United States




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


Re: [twitter-dev] oAuth new stuff?

2009-12-30 Thread Isaiah Carew



i think i've failed to connect and instead i've offended you. i'm  
sorry, it wasn't my intention.



i feel there is a lack of user education going on to explain to  
users why oauth is actually better for the use
i'm just not sure how this is pertinent to anything i wrote. as i  
said, i want to use oAuth -- i think we all do. you're preaching to  
the converted.  :-)



additionally, i understand that simply putting up a dialog box with  
two text input fields is easier to code than writing software that  
manipulates a browser, and that is why a lot of applications do that.
as i said, i've already gone through the trouble of releasing an open  
source implementation of oAuth for Mac OS X -- so your hyperbole kind  
of misses the mark. myself and others have already done the hard work  
and released open source to help make it easier for the rest to come  
along.
i don't think it's the required effort that is preventing desktop apps  
from migrating -- it's just the user experience.



let me start again.

i wanted to show that the current oAuth flow for desktop apps is  
preventing many desktop apps from moving to oAuth.
i did this because your offhand I don't know, response seemed to  
indicate that the announced changes were not getting much priority in  
the api.
i wanted to help you see the importance of these changes for desktop  
clients.



i'm really excited about the changes. i'm dying to start working on  
them. i'm committed to releasing an open source solution to them as  
soon as they come out.

i hope you're as excited as i am.

if it's unclear on exactly which changes i'm talking about.  it's the  
ones that you mentioned in this post:

http://groups.google.com/group/twitter-development-talk/msg/18b38db599f6ad98?hl=en

thanks,
isaiah


On Dec 30, 2009, at 5:53 AM, Raffi Krikorian wrote:

i understand that you have to tow the line. i agree with it — at  
least in principle. i like oauth. i understand it. i *want* to put  
it in my app. aside from my desktop client, i released an open  
source oAuth solution: http://thurly.net//5nl


yet, of the prominent mac clients (tweetie, twitteriffic, socialite,  
beak, bluebird, kiwi) only one is currently using oAuth. the reasons  
are painfully obvious and have been discussed here and elsewhere ad  
nauseum:

http://groups.google.com/group/twitter-development-talk/search?hl=engroup=twitter-development-talkq=oauth+desktopqt_g=Search+this+group

honestly, i actually resent the i understand that you have to tow  
the line statement.


i feel there is a lack of user education going on to explain to  
users why oauth is actually better for the user -- for a list of  
said reasons, please see http://apiwiki.twitter.com/OAuth+Example+-+Ruby 
.  additionally, i understand that simply putting up a dialog box  
with two text input fields is easier to code than writing software  
that manipulates a browser, and that is why a lot of applications do  
that.


as i see it, and having written software against the Twitter APIs  
(ate our own dogfood), what's missing are the following two things  
(please add to the list):
	• when using oauth, a good way to integrate with third party  
services that also use twitter credentials (yfrog, twitpic, URL  
shorteners, etc.) -- this is delegation

• 
http://groups.google.com/group/twitter-development-talk/browse_thread/thread/ac563255efcb/951ee32ec9cea3a8?lnk=gstq=delegation#951ee32ec9cea3a8
• http://twitter.com/twitterapi/status/6743938510
	• a good workflow for desktop apps -- specifically, desktop  
applications that have access to a browser.  i am -not- talking  
about rich environments that do not have access to a general purpose  
browser (set top boxes, game consoles, etc.)
what i would rather see, and what i'm interested in fixing, are  
those two.


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




[twitter-dev] background update by Oath

2009-12-30 Thread sjoerdc

i would like to update my background by using oath.

what ive got so far is this:

 $info = $toa-OAuthRequest('http://twitter.com/account/
update_profile_background_image.json', array('@image' =
'@twitterback.jpg'));
 $curl_handle = curl_init();
 curl_setopt($curl_handle, CURLOPT_URL, $info);
 $buffer = curl_exec($curl_handle);
 curl_close($curl_handle);

echo $info;


The echo will give me no error msg but some profile information.
but it will not update the background.

Can anybody help me out here?

thanks


Re: [twitter-dev] oAuth new stuff?

2009-12-30 Thread Raffi Krikorian

 i wanted to show that the current oAuth flow for desktop apps is preventing
 many desktop apps from moving to oAuth.


ah - yes - in this, we are in total agreement.  while the pin workflow, and
using protocol handlers work (protocol handlers probably better than pin
workflows), there still is a huge area of UX innovation that can occur and
user education that can occur to make this better.


 i did this because your offhand I don't know, response seemed to indicate
 that the announced changes were not getting much priority in the api.
 i wanted to help you see the importance of these changes for desktop
 clients.


the i don't know is just that - technically, its a relatively simple
thing, but i know, internally, we are working on the method by which to
release, the terms around the release, etc.  that, bundled with it being the
end of 2009 and everybody is on vacation, makes getting things out
relatively challenging.  but solely from a process stand point.


 i'm really excited about the changes. i'm dying to start working on them.
 i'm committed to releasing an open source solution to them as soon as they
 come out.
 i hope you're as excited as i am.


totally!

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


[twitter-dev] What You Put In Not The Same As What You Get Back Out

2009-12-30 Thread Kyle Mulka
When uploading a background image, the image contents seems to get
modified. Seems like I should be able to do an MD5 sum on the file
before it is uploaded, upload the image to Twitter, and when I
download the image do another MD5 sum and the two should be the same.
But they aren't. Why?

--
Kyle Mulka
Founder, Congo Labs
http://twilk.com


Re: [twitter-dev] What You Put In Not The Same As What You Get Back Out

2009-12-30 Thread Zac Bowling
Twitter has to host those files. Pure guess here but like thunbnails, it's
not completely unresonable that they maybe want to optimize them for size to
save a few dollars on the hosting bills.

Why does it mater?

Zac Bowling


On Wed, Dec 30, 2009 at 1:27 PM, Kyle Mulka repalvigla...@yahoo.com wrote:

 When uploading a background image, the image contents seems to get
 modified. Seems like I should be able to do an MD5 sum on the file
 before it is uploaded, upload the image to Twitter, and when I
 download the image do another MD5 sum and the two should be the same.
 But they aren't. Why?

 --
 Kyle Mulka
 Founder, Congo Labs
 http://twilk.com



Re: [twitter-dev] What You Put In Not The Same As What You Get Back Out

2009-12-30 Thread Raffi Krikorian
we run all upcoming images through a few filters to make sure nothing
malicious is occurring before we save them to disk.

On Wed, Dec 30, 2009 at 2:02 PM, Zac Bowling zbowl...@gmail.com wrote:

 Twitter has to host those files. Pure guess here but like thunbnails, it's
 not completely unresonable that they maybe want to optimize them for size to
 save a few dollars on the hosting bills.

 Why does it mater?

 Zac Bowling



 On Wed, Dec 30, 2009 at 1:27 PM, Kyle Mulka repalvigla...@yahoo.comwrote:

 When uploading a background image, the image contents seems to get
 modified. Seems like I should be able to do an MD5 sum on the file
 before it is uploaded, upload the image to Twitter, and when I
 download the image do another MD5 sum and the two should be the same.
 But they aren't. Why?

 --
 Kyle Mulka
 Founder, Congo Labs
 http://twilk.com





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


[twitter-dev] Re: What You Put In Not The Same As What You Get Back Out

2009-12-30 Thread Kyle Mulka
My application uploads a background image on a user's behalf. I want
to be able to figure out if they are still using the background image
at some future point in time.

--
Kyle Mulka
Founder, Congo Labs
http://twilk.com

On Dec 30, 5:02 pm, Zac Bowling zbowl...@gmail.com wrote:
 Twitter has to host those files. Pure guess here but like thunbnails, it's
 not completely unresonable that they maybe want to optimize them for size to
 save a few dollars on the hosting bills.

 Why does it mater?

 Zac Bowling

 On Wed, Dec 30, 2009 at 1:27 PM, Kyle Mulka repalvigla...@yahoo.com wrote:
  When uploading a background image, the image contents seems to get
  modified. Seems like I should be able to do an MD5 sum on the file
  before it is uploaded, upload the image to Twitter, and when I
  download the image do another MD5 sum and the two should be the same.
  But they aren't. Why?

  --
  Kyle Mulka
  Founder, Congo Labs
 http://twilk.com


Re: [twitter-dev] Re: What You Put In Not The Same As What You Get Back Out

2009-12-30 Thread John Adams


On Dec 30, 2009, at 4:21 PM, Kyle Mulka wrote:


My application uploads a background image on a user's behalf. I want
to be able to figure out if they are still using the background image
at some future point in time.



The filename might work as a test for this, instead of the  
computationally expensive MD5 on an image hack.


We still retain the original file (basename) on images.

-j

---
John Adams (@netik)
Twitter Operations
j...@twitter.com
http://twitter.com/netik









[twitter-dev] issues with retweets and API

2009-12-30 Thread John
I have 2 issues with the current API regarding retweets:

1. After favoriting a retweet the original tweet gets favorited. Since
the original tweet gets favorited row.retweeted_status.favorited
should be returned as True for any timeline methods. Currently it is
returned as False.

2. After retweeting a tweet any timeline methods should include some
value letting you know that the tweet has been retweeted so you can
Undo rather than Retweet which returns an error if you try to
retweet a tweet thats already been retweeted. Maybe something like
row.retweeted_by_me = True/False

Number 2 will probably require creating a new api method to undo the
retweet, maybe something like:
statuses/retweet_destroy (using the original tweet id)




[twitter-dev] Docs wrong for retweets method? Count seems to be ignored if 20

2009-12-30 Thread Tim Haines
Hey guys,

I'm trying:

curl -u timhaines:123#notreally
http://twitter.com/statuses/retweets/5635825799.json?count=100

and only the first 20 RTs are being returned.  Same with the xml method.

The docs (
http://apiwiki.twitter.com/Twitter-REST-API-Method:-statuses-retweets) say
you should be able to fetch up to the first 100.

Am I doing it wrong?  Or Doc/API bug?

Tim.


[twitter-dev] Re: Ambiguity with 401 error response code

2009-12-30 Thread Vignesh
Hi,

I am a developer at twivert . com
Twivert users are signned in using twitter.

For the past 15 hours or so we are getting continuous 401 unauthorizd
errors.
This error is happening for all requests to the API from our
application.
Our users are not able to sign in.

Please advice on what should be done.

Thank you
-vignesh


On Dec 29, 11:45 am, Raffi Krikorian ra...@twitter.com wrote:
 hi eric.

 yup - you've hit it right on the head.  one of the main initiatives in us
 starting to version our API is so that we can really consolidate and make
 our error codes consistent.  unfortunately, for legacy compatibility
 reasons, we can't change the second case to have a 402 error and we will
 have to keep it as a 401.

 what you could do is parse the response that comes back in the 401, however.
  in the case that your password is wrong, the error should be

 Could not authenticate you.

 for basic auth and OAuth. the second case has an error of

 Not authorized

 On Mon, Dec 28, 2009 at 3:38 PM, Eric Marcoullier @ Gnip 



 e...@marcoullier.com wrote:
  We're trying to build some logic into our data collector and we've
  been fighting with an issue for a while involving the 401
  Unauthorized error code.

  There are two instances where I can get this response

  1) Bad credentials.  I try to log in with an invalid username or
  password.
  2) I don't have access to a specific user's private account.

  The former can be a real problem for a user.  I changed my password a
  few weeks ago and forgot that I was using it for whitelisted REST API
  access.  Querying three times in rapid succession with a bad password
  causes a temporary lockdown of a user's account.  I was querying once
  per second and locked the account for a five days.  This is an account-
  level issue and the proper way to deal with this from our perspective
  is to immediately sleep the poller for 30 minutes and send an alert
  about bad credentials.

  This is completely different than if someone I'm following has taken
  their account private.  In this case, sleeping for 30 minutes (or any
  amount of time, really) is overkill.  Unless I'm querying for a single
  person over and over, there's no reason to pause before moving onto
  the next rule that I'm querying for.

  Unfortunately, we have no way to disambiguate between the two 401s and
  we're forced to either lock someone's account (ignoring 401s) or
  severely reduce their polling efficiency (acting on 401s).

  Best case would be to break these two error conditions out into
  separate error codes.  Perhaps a 401 for bad credentials and a 402 for
  lack of authorization for a specific piece of content.

  Please let know if I've overlooked something that would help me
  disambiguate the use cases in the current system.

  Thanks!
  Eric

 --
 Raffi Krikorian
 Twitter Platform Teamhttp://twitter.com/raffi


[twitter-dev] Access OAuth Pages Externally

2009-12-30 Thread serioussamp
Hi,
Does anyone know of a way to access a page that requires OAuth from a
URL without logging in? I am trying to scrape a page for extra data
for a Yahoo Pipes feed but the page can only be access when you are
logged in using twitter OAuth. I am teaching myself all this at the
moment so I might have missed something obvious but I would be really
grateful if someone could give me a hand with this or at least tell me
if it is not possible.

Thanks for any help and I hope when I have fully learnt this I can
make a reasonable contribution to the community.

SeriousSamP.


Re: [twitter-dev] Access OAuth Pages Externally

2009-12-30 Thread Cameron Kaiser
 Does anyone know of a way to access a page that requires OAuth from a
 URL without logging in? I am trying to scrape a page for extra data
 for a Yahoo Pipes feed but the page can only be access when you are
 logged in using twitter OAuth. I am teaching myself all this at the
 moment so I might have missed something obvious but I would be really
 grateful if someone could give me a hand with this or at least tell me
 if it is not possible.
 
 Thanks for any help and I hope when I have fully learnt this I can
 make a reasonable contribution to the community.

Don't scrape pages. Your app or IP could be blocked for that activity.
What are you trying to access? There is probably an API method for it you
could use, and many may be accessed anonymously.

-- 
 personal: http://www.cameronkaiser.com/ --
  Cameron Kaiser * Floodgap Systems * www.floodgap.com * ckai...@floodgap.com
-- Drive defensively ... buy a tank. --


Re: [twitter-dev] Access OAuth Pages Externally

2009-12-30 Thread SeriousSamP




Cameron Kaiser wrote:

  
Does anyone know of a way to access a page that requires OAuth from a
URL without logging in? I am trying to scrape a page for extra data
for a Yahoo Pipes feed but the page can only be access when you are
logged in using twitter OAuth. I am teaching myself all this at the
moment so I might have missed something obvious but I would be really
grateful if someone could give me a hand with this or at least tell me
if it is not possible.

Thanks for any help and I hope when I have fully learnt this I can
make a reasonable contribution to the community.

  
  
Don't scrape pages. Your app or IP could be blocked for that activity.
What are you trying to access? There is probably an API method for it you
could use, and many may be accessed anonymously.

  

I am trying to send retweets using retweet.it from rss data. I was
hoping to filter out the ones that matched certain keyword criteria and
automatically retweet them from a php page that can only be accessed
wehn logged in as it uses you account.




[twitter-dev] Re: Oauth authentication jquery

2009-12-30 Thread Hari
Is it a case of same origin policy
http://en.wikipedia.org/wiki/Same_origin_policy

On Dec 10, 8:27 am, Daniel Silva danielmartinssi...@gmail.com wrote:
 When I trying to do Oauth authentication with jquery it always receives a
 empty response. I'm doing this:

 $.ajax({
    beforeSend: function(xhr) {
      xhr.setRequestHeader(Authentication, authorizationHeader)
    },
    url:'https://twitter.com/oauth/request_token',
    type: 'get',
    contentType: 'application/x-www-form-urlencoded',
    async: false,
    success: function(msg){
      alert( Data:  + msg );
    }

 });

 //output -- Data: 

 Can someone help me?
 --
 best regards,

 Daniel Silva


Re: [twitter-dev] issues with retweets and API

2009-12-30 Thread srikanth reddy
I am looking for the same.
i guess there is some caching problem
After favoriting a retweet it is getting added to my fav list.
But the retweeted_status.favorited flag is not updated (even for
statuses/retweeted_to_me)
They are updated after some time. If i unfavorite again then it is updated
in my favorites list but not in statuses/retweeted_to_me.


For your second point
I am not seeing the retweeted status in my home_timeline for some reason.
Even If they appear i would just check for status[i].retweeted_status !=
null or if the current user matches status[i].user.screen_name

Also Isn't  Undo retweet equivalent to statuses/destroy where the id is your
status id i.e status[i].id?


On Thu, Dec 31, 2009 at 5:42 AM, John munz...@gmail.com wrote:

 I have 2 issues with the current API regarding retweets:

 1. After favoriting a retweet the original tweet gets favorited. Since
 the original tweet gets favorited row.retweeted_status.favorited
 should be returned as True for any timeline methods. Currently it is
 returned as False.

 2. After retweeting a tweet any timeline methods should include some
 value letting you know that the tweet has been retweeted so you can
 Undo rather than Retweet which returns an error if you try to
 retweet a tweet thats already been retweeted. Maybe something like
 row.retweeted_by_me = True/False

 Number 2 will probably require creating a new api method to undo the
 retweet, maybe something like:
 statuses/retweet_destroy (using the original tweet id)