[twitter-dev] Re: mentions API broken?

2010-06-21 Thread Mark Sievers
Have since noticed that new mentions are now appearing, yet the
mentions within the time block mentioned above are still not
appearing. Here are two examples of mentions that are not appearing in
my mentions API call:

* http://twitter.com/michaelayates/status/16652366500
  who would have thought a little wooden stick would be the best piece
of engineering in the office last week. Well done @markdsievers

* http://twitter.com/RhysC/status/16656725459
  RT @markdsievers #allwhites Fallon learned to elbow at
#RangitotoCollege  #represent #nzl New Zealand


[twitter-dev] Re: xAuth: Fetching Acess_Token.. 401 Error

2010-06-21 Thread priju paul
Hi Taylor,

Finally some reason to smile. I got it working! Earlier i tried with
the time stamp as seconds..but that too didnt work.
The issue was to do with Body of the request. I was url encoding the
entire string.

x_auth_mode%3Dclient_auth%26x_auth_password%3DPASSWORD
  %26x_auth_username%3DUSERNAME

But it looks like only the PASSWORD and USERNAME fields are to be url
encoded..hmm.. It took me 2 days to figure it out..

Thanks for your support.

Cheers,
Priju



On Jun 18, 11:18 pm, Taylor Singletary taylorsinglet...@twitter.com
wrote:
 Hi Priju,

 Assuming that you also have xAuth access enabled in your application, I
 think the issue might be around your timestamp -- it appears to be in
 milliseconds and not seconds -- the oauth_timestamp field should be in
 seconds. Hope that solves your problem!

 Thanks,
 Taylor

 On Fri, Jun 18, 2010 at 11:00 AM, priju paul prijujacobp...@gmail.comwrote:

  Hi All,

  Im Tired!!! Was working on this right from mrning to get the
  authentication
  working using xAuth. I always get *401 error*.

  Here is what im doing.

  Request URL:https://api.twitter.com/oauth/access_token

  Signature Base String:

  POSThttps%3A%2F%2Fapi.twitter.com
  %2Foauth%2Faccess_tokenoauth_consumer_key%3DD31A2bkKGtA8jAvuc15g
  %26oauth_nonce%3DMToxOj555%26oauth_signature_method%3DHMAC-
  SHA1%26oauth_timestamp%3D1276894058513750%26oauth_version
  %3D1.0%26x_auth_mode%3Dclient_auth%26x_auth_password%3DPASSWORD
  %26x_auth_username%3DUSERNAME
  HTTP POST Body:

  x_auth_mode%3Dclient_auth%26x_auth_password%3DPASSWORD
  %26x_auth_username%3DUSERNAME

  HEADER:

  OAuth oauth_nonce=MToxOj555, oauth_signature_method=HMAC-SHA1,
  oauth_timestamp=1276894058513750,
  oauth_consumer_key=D31A2bkKGtA8jAvuc15g,
  oauth_signature=1WKKwjlPzcaw7n9m+B4Gwtja5IE%3D, oauth_version=1.0

  ContentType: application/x-www-form-urlencoded
  Host: api.twitter.com
  Accept:application/json

  Really not sure whats going wrong. Im trying from my Symbian emulator.
  Could
  you please help me out.

  Let me know if you are looking for more informations.

  Cheers,
  Priju


[twitter-dev] Re: mentions API broken?

2010-06-21 Thread Mark Sievers
Here are the samples from two API calls:
http://api.twitter.com/1/statuses/friends_timeline.xml?count=200
outputs the contents of http://www.filesavr.com/5oCumzqP

http://api.twitter.com/1/statuses/mentions.xml?count=200
outputs the contents of http://www.filesavr.com/KsdMpS10

You will notice from the timeline output, statuses 16656725459 and
16652366500 do not appear in the mentions output.


[twitter-dev] Search Widget of Twitter

2010-06-21 Thread Reks
hi

I am using the Search Widget of Twitter and its working very fine as
of now.

Is there any way by which we can filter / remove  irrelevant tweets
picked by this widget?

Also can we show these tweets in some other fomat?

Please help.


[twitter-dev] Feature Suggestions: Find friends on Facebook

2010-06-21 Thread hkdobrev
I would like to suggest a new tab in Find People section. Except 'find
on contacts' and 'invite by email', it would be good to find friends
on Facebook.com who are on Twitter. It will definitely drive more
users to Twitter if you could invite a facebook friend directly to
Twitter.


[twitter-dev] twitter and google earth

2010-06-21 Thread jeckson
Hai

Is there discussion about chaining twitter and google earth?

Regards
Jeckson


[twitter-dev] Search not finding more than 1 tweet

2010-06-21 Thread envex
Hello,

I'm playing around with the search API, but i've run into a problem.

I've had 3 accounts tweet a url: http://jprim.com/googman/

This first account is showing up in the search:
http://twitter.com/search?q=http://jprim.com/googman/

http://twitter.com/envex/statuses/16426549821

These two accounts are not showing up in the actual twitter page
search, or using 
http://search.twitter.com/search.json?q=http://jprim.com/googman/

http://twitter.com/dharma/status/16443864226
http://twitter.com/superfuturemov/status/16650869838

Am I doing something wrong when searching, or is there a potential
bug?

Thanks!

Matt Vickers


[twitter-dev] API access to the RSS feeds for all the tweets a User has selected to follow

2010-06-21 Thread Truthstone
Is it possible (with the user's express permission of course) to gain
access to a copy of all the tweets a user has configured to
follow?  We are developing an eyes free service and would like to
include Twitter as a data-source.


Re: [twitter-dev] API access to the RSS feeds for all the tweets a User has selected to follow

2010-06-21 Thread Taylor Singletary
Hi there,

Are you looking for a RSS feed of all the status updates from users that a
specific member has chosen to follow? That would be the user's home
timeline, and yes we do offer an RSS feed representation of it.
Documentation: http://dev.twitter.com/doc/get/statuses/home_timeline

The user's express permission in this case is best negotiated by using
OAuth: http://dev.twitter.com/auth

Taylor

On Sun, Jun 20, 2010 at 5:08 PM, Truthstone komm...@gmail.com wrote:

 Is it possible (with the user's express permission of course) to gain
 access to a copy of all the tweets a user has configured to
 follow?  We are developing an eyes free service and would like to
 include Twitter as a data-source.



Re: [twitter-dev] Search not finding more than 1 tweet

2010-06-21 Thread Taylor Singletary
Hi Matt,

The Twitter Search service doesn't index and make available every tweet in
the system -- it filters for spam, in some ways relevance, and a few other
factors.

You can read about why your tweets might not be surfacing in search here:
http://bit.ly/missing-from-search

Taylor

On Sun, Jun 20, 2010 at 8:18 PM, envex m...@vantagestudios.ca wrote:

 Hello,

 I'm playing around with the search API, but i've run into a problem.

 I've had 3 accounts tweet a url: http://jprim.com/googman/

 This first account is showing up in the search:
 http://twitter.com/search?q=http://jprim.com/googman/

 http://twitter.com/envex/statuses/16426549821

 These two accounts are not showing up in the actual twitter page
 search, or using
 http://search.twitter.com/search.json?q=http://jprim.com/googman/

 http://twitter.com/dharma/status/16443864226
 http://twitter.com/superfuturemov/status/16650869838

 Am I doing something wrong when searching, or is there a potential
 bug?

 Thanks!

 Matt Vickers



Re: [twitter-dev] Re: mentions API broken?

2010-06-21 Thread Taylor Singletary
Hi Mark,

Last week we had some bad juju with our caching facilities and have been
running some processes in the background to restore the cache throughout the
weekend and week.

Are you still seeing the issue now? Since @mentions is an authenticated
call, I can't execute it from your perspective to verify.

Taylor

On Mon, Jun 21, 2010 at 12:16 AM, Mark Sievers mark.siev...@gmail.comwrote:

 Here are the samples from two API calls:
 http://api.twitter.com/1/statuses/friends_timeline.xml?count=200
 outputs the contents of http://www.filesavr.com/5oCumzqP

 http://api.twitter.com/1/statuses/mentions.xml?count=200
 outputs the contents of http://www.filesavr.com/KsdMpS10

 You will notice from the timeline output, statuses 16656725459 and
 16652366500 do not appear in the mentions output.



Re: [twitter-dev] Re: Dev Portal Login

2010-06-21 Thread Taylor Singletary
I'll be totally honest: we've had issues with getting API team deploys out
recently -- the World Cup being partly to blame, but a bevy of other reasons
as well.

This bug has actually been present now for several weeks. Bug fixes for the
bug have gone out several times, but other issues within the release bucket
have caused the bug fix to be rolled back.

For now, the best thing to do is log in via twitter.com first, then go to
the portal. I'm putting money on this getting out this week.

Taylor


On Sun, Jun 20, 2010 at 5:11 PM, Dewald Pretorius dpr...@gmail.com wrote:

 Taylor,

 When is developer.twitter.com/login going to be fixed? It's been down
 now for at least the past 5 days already.

 Really weird that nobody complains about it here. Doesn't anybody
 register new Twitter applications anymore?

 On Jun 16, 12:15 pm, Taylor Singletary taylorsinglet...@twitter.com
 wrote:
  There is no SSL certificate for developer.twitter.com or dev.twitter.com--
  there's only one for twitter.com. Normally that form submits via SSL to
  twitter.com and then redirects back to dev.twitter.com. It will be fixed
  soon.
 
 
 
  On Wed, Jun 16, 2010 at 7:53 AM, Dewald Pretorius dpr...@gmail.com
 wrote:
   Login to developer.twitter.com kicks back developer.twitter.com uses
   an invalid security certificate.
 
   Are things falling apart in the Twitter world?
 
   On Jun 15, 4:55 pm, Taylor Singletary taylorsinglet...@twitter.com
   wrote:
Sorry for all the issues around this login -- I really want to get
 this
login functioning correctly but we've had some system-wide changes
   recently
that have made some elements of fixing this for reals though
 difficult.
It's an incredibly basic issue that's overcomplicated by the
   particularities
of our production environment, the interaction of SSL, and
 subdomains. I
hope to have it fixed by the end of the week.
 
For now -- login to twitter.com, then go to the portal.
 
Taylor Singletary
Developer Advocate, Twitterhttp://twitter.com/episod
 
On Tue, Jun 15, 2010 at 12:41 PM, Brian Wigginton
brianwiggin...@gmail.comwrote:
 
 Is anyone else having problems logging into the dev portal?
 
 I keep getting directed tohttps://twitter.com/sessionswiththe
 message Sorry, that page doesn’t exist!
 
 -Brian Wigginton



Re: [twitter-dev] Re: Coming soon: a solution for Open Source applications using OAuth with the Twitter API

2010-06-21 Thread Taylor Singletary
Hi Everyone,

We're waiting on a few minor bug fixes to be in place before rolling this
out to a wider audience. I'll post a new message when things are good to go
and we're ready to accept applications into the feature.

Taylor

On Sun, Jun 20, 2010 at 1:30 AM, nov mat...@gmail.com wrote:

 Hi, Twitter API team

 Is this feature already released?
 If so, how can we register key_exchange enabled consumers?

 On 6月12日, 午前7:56, Taylor Singletary taylorsinglet...@twitter.com
 wrote:
  Hi Developers,
 
  As has been discussed on the list recently, OAuth and Open Source
  applications are a difficult combination because token secrets shouldn't
 be
  embedded in widely distributed code.
 
  We're pleased to announce that we've devised a solution to this problem.
 
  Next week, we plan to release a new extension to the Twitter API that
 will
  allow Open Source applications to obtain OAuth consumer keys and secrets
 for
  their users, without having to distribute an application secret.
 
  Approved Open Source client applications will have an easy to implement
  ability, through dev.twitter.com, to generate new client tokens 
 secrets to
  be used specifically for each new instance of the application.
 
  While completing the process does require the end-user to complete a few
  extra operations, we think this is a good compromise.
 
  The source tag on tweets published by the child applications generated
 with
  this approach will be a variation on the originating application's name.
 For
  examples, if the name of the parent application was AdventureTweet and
 the
  user's screen name was @zork, then the child application's name would be
  AdventureTweet (zork).
 
  The work flow for these applications will be something like this:
 
1. You store your API Consumer Key in your application distribution
 (but
  never your secret!).
2. A user downloads/installs/checks out your open source application
 and
  runs it for the first time
3. Your application builds a URL to our key exchange endpoint, using
 your
  consumer key.
Example:
 http://dev.twitter.com/apps/key_exchange?oauth_consumer_key=abcdefghi...
4. You send the user to that URL in whatever way makes sense in your
  environment.
5. That user will have to login using their Twitter credentials (if
 they
  aren't already), and then approve your application's request to replicate
  itself on the user's behalf.
6. The approval will require that the user agrees to our terms of
 service,
  as this process results in them having control of their own application
7. The user is presented with a string that they are asked to paste
 into
  your application. The string will contain ah API key and secret, in
 addition
  to an access token and token secret for the member: everything that's
 needed
  to get the user up and running in your application.
8. The user pastes the string into your application, which then
 consumes
  and stores it to begin performing API calls using OAuth.
 
  The string containing the keys will be x-www-form-urlencoded. To keep the
  string brief, it will contain abbreviated key names.
 
  An example:
 
 ck=KIyzzZUM7KvKYOpnst2aOwcs=4PQk1eH4MadmzzEZ1G1KdrWHIFC1IPxv1kXZg0G3Eat=5
 42212-utEhFTv5GZZcc2R4w6thnApKtf1N1eKRedcFJthdeAats=FFdeOEwxOBWPPREd55
 dKx7AAaI8NfpK7xnibv4Yls
 
  Where: ck - consumer key, cs - consumer secret, at - access token,
  ats - access token secret
 
  This kind of key requisition service is new to the Twitter ecosystem, and
  we're going to be closely monitoring it for abuse. Once we announce its
  availability, we'll begin taking requests for Open Source applications
 that
  would like to offer the feature in their application.
 
  We're excited to offer this solution to the open source community. Thanks
  everyone!
 
  Taylor Singletary
  Developer Advocate, Twitterhttp://twitter.com/episod



Re: [twitter-dev] Re: Oauth Echo and Drupal

2010-06-21 Thread Taylor Singletary
Hi Tim,

The call specified in your HTTP_X_* headers is for the OAuth Echo provider
to execute against the API. Since they execute the call, it invalidates the
oauth_nonce you provided. Really, it's a different API call that your
application should be executing following an OAuth Echo transaction..

1. You've got something to post with TwitPic
2. You setup a mock request to Twitter to verify credentials so that TwitPic
can identify your user with Twitter
3. You send that mock request in HTTP_X_* headers to Twitpic, along with
your API request to Twitpic with the image
4. TwitPic executes the Twitter API call specified in the HTTP_X_* headers,
verifying the user
5. On success, TwitPic sends you in its response information about the media
you just uploaded on behalf of your user
6. You take that response and append it to a tweet, or whatever other API
operation you're doing, and send a brand new request to Twitter

Is this the flow you're following or are you trying to do something else?

Taylor

On Sat, Jun 19, 2010 at 12:40 PM, Tim Millwood t...@millwoodonline.co.ukwrote:

 So... I now have a test app which is sending oAuth Echo request
 successfully to Twitpic.

 If I change the URL to my web app I get a 401 error back from Twitter,
 so there is something I am doing wrong.

 I am getting the HTTP_X_AUTH_SERVICE_PROVIDER and
 HTTP_X_VERIFY_CREDENTIALS_AUTHORIZATION headers from the test app,
 then my web app is renaming the
 HTTP_X_VERIFY_CREDENTIALS_AUTHORIZATION header to Authorization and
 POSTing both to the URL in HTTP_X_AUTH_SERVICE_PROVIDER.

 This returns the 401 error.

 On Jun 17, 2:44 pm, Taylor Singletary taylorsinglet...@twitter.com
 wrote:
  Hi Tim,
 
  I'm not familiar with the Drupal OAuth module, but can help you a little
  bit.
 
  Hopefully that module is a bit flexible in the different approaches you
 can
  use to perform OAuth with it. Essentially, you need to build a mock
  request that you won't actually execute against an endpoint at Twitter
  using your credentials. The canon for OAuth Echo right now is to build a
 GET
  request tohttp://api.twitter.com/1/account/verify_credentials.json-- but
  essentially, you can use any resource you want (and the OAuth Echo proxy
  provider could do something with the response in conjunction with your
  request -- TwitPic, yFrog, etc. are only just one possibility of the
 things
  you can do with OAuth Echo.
 
  I edited up a good example in simple PHP of using OAuth Echo against
 TwitPic
  the other day:http://pastie.org/pastes/1005387
 
  Taylor
 
  On Thu, Jun 17, 2010 at 1:40 AM, Tim Millwood t...@millwoodonline.co.uk
 wrote:
 
 
 
   I'm trying to get oAuth Echo working withhttp://drippic.com
 
   My API url ishttp://drippic.com/drippic2/uploadif you want to give
   it a try.
 
   Here is my code.
   $sp = $_SERVER['HTTP_X_AUTH_SERVICE_PROVIDER'];
   $auth_cred = $_SERVER['HTTP_X_VERIFY_CREDENTIALS_AUTHORIZATION'];
   $response = drupal_http_request($sp,
   array('HTTP_X_AUTH_SERVICE_PROVIDER'=$sp,'Authorization'=
   $auth_cred),'POST');
   watchdog('drippic','/pre'.print_r($response,true).'/pre');
   print(json_encode($response));
 
   I'm not sure what I need to send it, I copied Twitpic's example and
   used this in terminal
   curl -v -H 'X-Auth-Service-Provider:
  https://api.twitter.com/1/account/verify_credentials.json'
   -H 'X-Verify-Credentials-Authorization: OAuth realm=http://
   api.twitter.com/, oauth_consumer_key=GDdmIQH6jhtmLUypg82g,
   oauth_signature_method=HMAC-SHA1, oauth_token=819797-
   Jxq8aYUDRmykzVKrgoLhXSq67TEa5ruc4GJC2rWimw,
   oauth_timestamp=1272325550,
   oauth_nonce=oElnnMTQIZvqvlfXM56aBLAf5noGD0AQR3Fmi7Q6Y,
   oauth_version=1.0, oauth_signature=U1obTfE7Rs9J1kafTGwufLJdspo%3D'
  http://drippic.com/drippic2/upload
 
   It returns 401, guess it's because the details are wrong, and not sure
   what I should use.
 
   Can anyone help?
 
   (don't really know enough about oAuth, oAuth on the site is all
   managed by the Drupal oAuth module)



[twitter-dev] Re: Oauth Echo and Drupal

2010-06-21 Thread Tim Millwood
I am trying to do something else.

I am not trying post to twitpic, I am trying to post to my own web app
(similar to twitpic).

I am getting the HTTP_X_AUTH_SERVICE_PROVIDER and
HTTP_X_VERIFY_CREDENTIALS_AUTHORIZATION headers from the test app,
then my web app is renaming the
HTTP_X_VERIFY_CREDENTIALS_AUTHORIZATION header to Authorization and
POSTing both to the URL in HTTP_X_AUTH_SERVICE_PROVIDER.
This returns the 401 error.


On Jun 21, 3:11 pm, Taylor Singletary taylorsinglet...@twitter.com
wrote:
 Hi Tim,

 The call specified in your HTTP_X_* headers is for the OAuth Echo provider
 to execute against the API. Since they execute the call, it invalidates the
 oauth_nonce you provided. Really, it's a different API call that your
 application should be executing following an OAuth Echo transaction..

 1. You've got something to post with TwitPic
 2. You setup a mock request to Twitter to verify credentials so that TwitPic
 can identify your user with Twitter
 3. You send that mock request in HTTP_X_* headers to Twitpic, along with
 your API request to Twitpic with the image
 4. TwitPic executes the Twitter API call specified in the HTTP_X_* headers,
 verifying the user
 5. On success, TwitPic sends you in its response information about the media
 you just uploaded on behalf of your user
 6. You take that response and append it to a tweet, or whatever other API
 operation you're doing, and send a brand new request to Twitter

 Is this the flow you're following or are you trying to do something else?

 Taylor

 On Sat, Jun 19, 2010 at 12:40 PM, Tim Millwood 
 t...@millwoodonline.co.ukwrote:



  So... I now have a test app which is sending oAuth Echo request
  successfully to Twitpic.

  If I change the URL to my web app I get a 401 error back from Twitter,
  so there is something I am doing wrong.

  I am getting the HTTP_X_AUTH_SERVICE_PROVIDER and
  HTTP_X_VERIFY_CREDENTIALS_AUTHORIZATION headers from the test app,
  then my web app is renaming the
  HTTP_X_VERIFY_CREDENTIALS_AUTHORIZATION header to Authorization and
  POSTing both to the URL in HTTP_X_AUTH_SERVICE_PROVIDER.

  This returns the 401 error.

  On Jun 17, 2:44 pm, Taylor Singletary taylorsinglet...@twitter.com
  wrote:
   Hi Tim,

   I'm not familiar with the Drupal OAuth module, but can help you a little
   bit.

   Hopefully that module is a bit flexible in the different approaches you
  can
   use to perform OAuth with it. Essentially, you need to build a mock
   request that you won't actually execute against an endpoint at Twitter
   using your credentials. The canon for OAuth Echo right now is to build a
  GET
   request tohttp://api.twitter.com/1/account/verify_credentials.json--but
   essentially, you can use any resource you want (and the OAuth Echo proxy
   provider could do something with the response in conjunction with your
   request -- TwitPic, yFrog, etc. are only just one possibility of the
  things
   you can do with OAuth Echo.

   I edited up a good example in simple PHP of using OAuth Echo against
  TwitPic
   the other day:http://pastie.org/pastes/1005387

   Taylor

   On Thu, Jun 17, 2010 at 1:40 AM, Tim Millwood t...@millwoodonline.co.uk
  wrote:

I'm trying to get oAuth Echo working withhttp://drippic.com

My API url ishttp://drippic.com/drippic2/uploadifyou want to give
it a try.

Here is my code.
$sp = $_SERVER['HTTP_X_AUTH_SERVICE_PROVIDER'];
$auth_cred = $_SERVER['HTTP_X_VERIFY_CREDENTIALS_AUTHORIZATION'];
$response = drupal_http_request($sp,
array('HTTP_X_AUTH_SERVICE_PROVIDER'=$sp,'Authorization'=
$auth_cred),'POST');
watchdog('drippic','/pre'.print_r($response,true).'/pre');
print(json_encode($response));

I'm not sure what I need to send it, I copied Twitpic's example and
used this in terminal
curl -v -H 'X-Auth-Service-Provider:
   https://api.twitter.com/1/account/verify_credentials.json'
-H 'X-Verify-Credentials-Authorization: OAuth realm=http://
api.twitter.com/, oauth_consumer_key=GDdmIQH6jhtmLUypg82g,
oauth_signature_method=HMAC-SHA1, oauth_token=819797-
Jxq8aYUDRmykzVKrgoLhXSq67TEa5ruc4GJC2rWimw,
oauth_timestamp=1272325550,
oauth_nonce=oElnnMTQIZvqvlfXM56aBLAf5noGD0AQR3Fmi7Q6Y,
oauth_version=1.0, oauth_signature=U1obTfE7Rs9J1kafTGwufLJdspo%3D'
   http://drippic.com/drippic2/upload

It returns 401, guess it's because the details are wrong, and not sure
what I should use.

Can anyone help?

(don't really know enough about oAuth, oAuth on the site is all
managed by the Drupal oAuth module)


Re: [twitter-dev] Re: Oauth Echo and Drupal

2010-06-21 Thread Taylor Singletary
Awesome. There's much untapped potential in OAuth Echo beyond just the
TwitPic, yFrog, etc. use cases.

This is an area where you're going to have to be very exacting. Have you
confirmed that the request you are building would actually execute against
Twitter correctly before you've sent it through your process? As in, have
you verified that the HTTP Authorization header you've created will work
against the end point before you've stuffed it into some other header,
processed the request, etc.

Can you share the authorization header you are using and how you've defined
the OAuth Echo headers? Your signature base string for the same?

Taylor

On Mon, Jun 21, 2010 at 8:06 AM, Tim Millwood t...@millwoodonline.co.ukwrote:

 I am trying to do something else.

 I am not trying post to twitpic, I am trying to post to my own web app
 (similar to twitpic).

 I am getting the HTTP_X_AUTH_SERVICE_PROVIDER and
 HTTP_X_VERIFY_CREDENTIALS_AUTHORIZATION headers from the test app,
 then my web app is renaming the
 HTTP_X_VERIFY_CREDENTIALS_AUTHORIZATION header to Authorization and
 POSTing both to the URL in HTTP_X_AUTH_SERVICE_PROVIDER.
 This returns the 401 error.


 On Jun 21, 3:11 pm, Taylor Singletary taylorsinglet...@twitter.com
 wrote:
  Hi Tim,
 
  The call specified in your HTTP_X_* headers is for the OAuth Echo
 provider
  to execute against the API. Since they execute the call, it invalidates
 the
  oauth_nonce you provided. Really, it's a different API call that your
  application should be executing following an OAuth Echo transaction..
 
  1. You've got something to post with TwitPic
  2. You setup a mock request to Twitter to verify credentials so that
 TwitPic
  can identify your user with Twitter
  3. You send that mock request in HTTP_X_* headers to Twitpic, along with
  your API request to Twitpic with the image
  4. TwitPic executes the Twitter API call specified in the HTTP_X_*
 headers,
  verifying the user
  5. On success, TwitPic sends you in its response information about the
 media
  you just uploaded on behalf of your user
  6. You take that response and append it to a tweet, or whatever other API
  operation you're doing, and send a brand new request to Twitter
 
  Is this the flow you're following or are you trying to do something else?
 
  Taylor
 
  On Sat, Jun 19, 2010 at 12:40 PM, Tim Millwood 
 t...@millwoodonline.co.ukwrote:
 
 
 
   So... I now have a test app which is sending oAuth Echo request
   successfully to Twitpic.
 
   If I change the URL to my web app I get a 401 error back from Twitter,
   so there is something I am doing wrong.
 
   I am getting the HTTP_X_AUTH_SERVICE_PROVIDER and
   HTTP_X_VERIFY_CREDENTIALS_AUTHORIZATION headers from the test app,
   then my web app is renaming the
   HTTP_X_VERIFY_CREDENTIALS_AUTHORIZATION header to Authorization and
   POSTing both to the URL in HTTP_X_AUTH_SERVICE_PROVIDER.
 
   This returns the 401 error.
 
   On Jun 17, 2:44 pm, Taylor Singletary taylorsinglet...@twitter.com
   wrote:
Hi Tim,
 
I'm not familiar with the Drupal OAuth module, but can help you a
 little
bit.
 
Hopefully that module is a bit flexible in the different approaches
 you
   can
use to perform OAuth with it. Essentially, you need to build a mock
request that you won't actually execute against an endpoint at
 Twitter
using your credentials. The canon for OAuth Echo right now is to
 build a
   GET
request tohttp://
 api.twitter.com/1/account/verify_credentials.json--but
essentially, you can use any resource you want (and the OAuth Echo
 proxy
provider could do something with the response in conjunction with
 your
request -- TwitPic, yFrog, etc. are only just one possibility of the
   things
you can do with OAuth Echo.
 
I edited up a good example in simple PHP of using OAuth Echo against
   TwitPic
the other day:http://pastie.org/pastes/1005387
 
Taylor
 
On Thu, Jun 17, 2010 at 1:40 AM, Tim Millwood 
 t...@millwoodonline.co.uk
   wrote:
 
 I'm trying to get oAuth Echo working withhttp://drippic.com
 
 My API url ishttp://drippic.com/drippic2/uploadifyou want to give
 it a try.
 
 Here is my code.
 $sp = $_SERVER['HTTP_X_AUTH_SERVICE_PROVIDER'];
 $auth_cred = $_SERVER['HTTP_X_VERIFY_CREDENTIALS_AUTHORIZATION'];
 $response = drupal_http_request($sp,
 array('HTTP_X_AUTH_SERVICE_PROVIDER'=$sp,'Authorization'=
 $auth_cred),'POST');
 watchdog('drippic','/pre'.print_r($response,true).'/pre');
 print(json_encode($response));
 
 I'm not sure what I need to send it, I copied Twitpic's example and
 used this in terminal
 curl -v -H 'X-Auth-Service-Provider:
https://api.twitter.com/1/account/verify_credentials.json'
 -H 'X-Verify-Credentials-Authorization: OAuth realm=http://
 api.twitter.com/, oauth_consumer_key=GDdmIQH6jhtmLUypg82g,
 oauth_signature_method=HMAC-SHA1, oauth_token=819797-
 Jxq8aYUDRmykzVKrgoLhXSq67TEa5ruc4GJC2rWimw,
   

[twitter-dev] Re: Oauth Echo and Drupal

2010-06-21 Thread Tim Millwood
I have a test air app that posts to Twitpic perfectly fine using oAuth
Echo, if I change the URL to my web app I get 401.

Here are the headers I am passing to twitter to verify credentials. Am
I missing some?

[HTTP_X_AUTH_SERVICE_PROVIDER] = 
https://api.twitter.com/1/account/verify_credentials.json

[Authorization] = OAuth
realm=twitter,oauth_consumer_key=t94eBtc4Pz2zqo4KhABseQ,oauth_token=6266632-
e0NRaGReqpzR84Floyg565BMJbBH4lYMxsJD9LNZY,oauth_version=1.0,oauth_timestamp=1276986312,oauth_nonce=KhWw0N,oauth_signature_method=HMAC-
SHA1,oauth_signature=ubKN3OQy8xC5Sdkn%2BD%2Bcq9c1ywY%3D

Tim


On Jun 21, 4:28 pm, Taylor Singletary taylorsinglet...@twitter.com
wrote:
 Awesome. There's much untapped potential in OAuth Echo beyond just the
 TwitPic, yFrog, etc. use cases.

 This is an area where you're going to have to be very exacting. Have you
 confirmed that the request you are building would actually execute against
 Twitter correctly before you've sent it through your process? As in, have
 you verified that the HTTP Authorization header you've created will work
 against the end point before you've stuffed it into some other header,
 processed the request, etc.

 Can you share the authorization header you are using and how you've defined
 the OAuth Echo headers? Your signature base string for the same?

 Taylor

 On Mon, Jun 21, 2010 at 8:06 AM, Tim Millwood 
 t...@millwoodonline.co.ukwrote:



  I am trying to do something else.

  I am not trying post to twitpic, I am trying to post to my own web app
  (similar to twitpic).

  I am getting the HTTP_X_AUTH_SERVICE_PROVIDER and
  HTTP_X_VERIFY_CREDENTIALS_AUTHORIZATION headers from the test app,
  then my web app is renaming the
  HTTP_X_VERIFY_CREDENTIALS_AUTHORIZATION header to Authorization and
  POSTing both to the URL in HTTP_X_AUTH_SERVICE_PROVIDER.
  This returns the 401 error.

  On Jun 21, 3:11 pm, Taylor Singletary taylorsinglet...@twitter.com
  wrote:
   Hi Tim,

   The call specified in your HTTP_X_* headers is for the OAuth Echo
  provider
   to execute against the API. Since they execute the call, it invalidates
  the
   oauth_nonce you provided. Really, it's a different API call that your
   application should be executing following an OAuth Echo transaction..

   1. You've got something to post with TwitPic
   2. You setup a mock request to Twitter to verify credentials so that
  TwitPic
   can identify your user with Twitter
   3. You send that mock request in HTTP_X_* headers to Twitpic, along with
   your API request to Twitpic with the image
   4. TwitPic executes the Twitter API call specified in the HTTP_X_*
  headers,
   verifying the user
   5. On success, TwitPic sends you in its response information about the
  media
   you just uploaded on behalf of your user
   6. You take that response and append it to a tweet, or whatever other API
   operation you're doing, and send a brand new request to Twitter

   Is this the flow you're following or are you trying to do something else?

   Taylor

   On Sat, Jun 19, 2010 at 12:40 PM, Tim Millwood 
  t...@millwoodonline.co.ukwrote:

So... I now have a test app which is sending oAuth Echo request
successfully to Twitpic.

If I change the URL to my web app I get a 401 error back from Twitter,
so there is something I am doing wrong.

I am getting the HTTP_X_AUTH_SERVICE_PROVIDER and
HTTP_X_VERIFY_CREDENTIALS_AUTHORIZATION headers from the test app,
then my web app is renaming the
HTTP_X_VERIFY_CREDENTIALS_AUTHORIZATION header to Authorization and
POSTing both to the URL in HTTP_X_AUTH_SERVICE_PROVIDER.

This returns the 401 error.

On Jun 17, 2:44 pm, Taylor Singletary taylorsinglet...@twitter.com
wrote:
 Hi Tim,

 I'm not familiar with the Drupal OAuth module, but can help you a
  little
 bit.

 Hopefully that module is a bit flexible in the different approaches
  you
can
 use to perform OAuth with it. Essentially, you need to build a mock
 request that you won't actually execute against an endpoint at
  Twitter
 using your credentials. The canon for OAuth Echo right now is to
  build a
GET
 request tohttp://
  api.twitter.com/1/account/verify_credentials.json--but
 essentially, you can use any resource you want (and the OAuth Echo
  proxy
 provider could do something with the response in conjunction with
  your
 request -- TwitPic, yFrog, etc. are only just one possibility of the
things
 you can do with OAuth Echo.

 I edited up a good example in simple PHP of using OAuth Echo against
TwitPic
 the other day:http://pastie.org/pastes/1005387

 Taylor

 On Thu, Jun 17, 2010 at 1:40 AM, Tim Millwood 
  t...@millwoodonline.co.uk
wrote:

  I'm trying to get oAuth Echo working withhttp://drippic.com

  My API url ishttp://drippic.com/drippic2/uploadifyouwant to give
  it a try.

  Here is my code.
  $sp = 

[twitter-dev] 1 error

2010-06-21 Thread patitayca
Exception Info: Exception has been thrown by the target of an
invocation.

at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at MetroTwit.ViewModel.TweetListViewModel..ctorb__6(Object o)


[twitter-dev] Re: Unfollows

2010-06-21 Thread Brian Sutorius
Whether through automated software or by hand, aggressive follower
churn is prohibited by our Twitter Rules: 
http://support.twitter.com/articles/18311
. See some of the bullet points under Spam for more detail.

Thanks,
Brian Sutorius
Twitter API Policy

On Jun 18, 5:44 pm, cdrecordings crownsdownrecordi...@gmail.com
wrote:
 Using SOFTWARE to constantly churn followers in a repeated pattern of
 following and unfollowing will
 however risk suspension. 

 What about following a certain number by hand, then unfollowing those
 who don't follow back by hand the next month or so?


[twitter-dev] Rate Limiting with desktop applications using C# HttpRequest

2010-06-21 Thread Jian Lu
I have whitelisted my account (but no ip), and am sending requests
through my desktop application by wrapping my credentials with C#
HttpRequest.

Very frequently, using the method above, I see my rates drop back to
150/hour and it drains out even I am not making any calls. Here is a
sample reponse I got by checking my rate limit:

{
remaining_hits = 0,
hourly_limit = 150,
reset_time_in_seconds = 1277141653,
reset_time = Mon Jun 21 17:34:13 + 2010
}

But strangely if I submit my rate-checking request on the SAME MACHINE
at the SAME TIME through curl, I got the correct limit, and it doesn't
automatically drain out if I don't make api request:

{reset_time_in_seconds:1277145186,remaining_hits:
2,reset_time:Mon Jun 21 18:33:06 + 2010,hourly_limit:
2}

The pattern I am seeing is:

1a. Right after limit RESET, if I query my rate limit through my C#
HttpRequest code, I get my whitelisted rates. BUT it drains out
automatically and quickly even I am not using it at all...

1b. But if I use curl to do a query to check my rate limit, even
though the checking in #1a shows something lower than my real usage,
the result returned from curl is always correct and equal to my real
usage.

3. When that limit drains out, I started to get the 150/hour limit
response but the remaining hits is 0 by issuing C# HttpRequests.

What I suspected is it has something to do with my network setting. I
am behind my company domain and maybe different machines within my
company network have the same external IP?

Is there any way to avoid that?

-Jian


[twitter-dev] Re: Oauth Echo and Drupal

2010-06-21 Thread Tim Millwood
Tried using Curl instead of drupal_http_request and got the following
error.

error setting certificate verify locations:\n  CAfile: \/etc\/ssl\/
certs\/ca-certificates.crt\n  CApath: none\n

Not sure what that means

On Jun 21, 4:40 pm, Tim Millwood t...@millwoodonline.co.uk wrote:
 I have a test air app that posts to Twitpic perfectly fine using oAuth
 Echo, if I change the URL to my web app I get 401.

 Here are the headers I am passing to twitter to verify credentials. Am
 I missing some?

 [HTTP_X_AUTH_SERVICE_PROVIDER] 
 =https://api.twitter.com/1/account/verify_credentials.json

 [Authorization] = OAuth
 realm=twitter,oauth_consumer_key=t94eBtc4Pz2zqo4KhABseQ,oauth_token=62 
 66632-
 e0NRaGReqpzR84Floyg565BMJbBH4lYMxsJD9LNZY,oauth_version=1.0,oauth_timest 
 amp=1276986312,oauth_nonce=KhWw0N,oauth_signature_method=HMAC-
 SHA1,oauth_signature=ubKN3OQy8xC5Sdkn%2BD%2Bcq9c1ywY%3D

 Tim

 On Jun 21, 4:28 pm, Taylor Singletary taylorsinglet...@twitter.com
 wrote:



  Awesome. There's much untapped potential in OAuth Echo beyond just the
  TwitPic, yFrog, etc. use cases.

  This is an area where you're going to have to be very exacting. Have you
  confirmed that the request you are building would actually execute against
  Twitter correctly before you've sent it through your process? As in, have
  you verified that the HTTP Authorization header you've created will work
  against the end point before you've stuffed it into some other header,
  processed the request, etc.

  Can you share the authorization header you are using and how you've defined
  the OAuth Echo headers? Your signature base string for the same?

  Taylor

  On Mon, Jun 21, 2010 at 8:06 AM, Tim Millwood 
  t...@millwoodonline.co.ukwrote:

   I am trying to do something else.

   I am not trying post to twitpic, I am trying to post to my own web app
   (similar to twitpic).

   I am getting the HTTP_X_AUTH_SERVICE_PROVIDER and
   HTTP_X_VERIFY_CREDENTIALS_AUTHORIZATION headers from the test app,
   then my web app is renaming the
   HTTP_X_VERIFY_CREDENTIALS_AUTHORIZATION header to Authorization and
   POSTing both to the URL in HTTP_X_AUTH_SERVICE_PROVIDER.
   This returns the 401 error.

   On Jun 21, 3:11 pm, Taylor Singletary taylorsinglet...@twitter.com
   wrote:
Hi Tim,

The call specified in your HTTP_X_* headers is for the OAuth Echo
   provider
to execute against the API. Since they execute the call, it invalidates
   the
oauth_nonce you provided. Really, it's a different API call that your
application should be executing following an OAuth Echo transaction..

1. You've got something to post with TwitPic
2. You setup a mock request to Twitter to verify credentials so that
   TwitPic
can identify your user with Twitter
3. You send that mock request in HTTP_X_* headers to Twitpic, along with
your API request to Twitpic with the image
4. TwitPic executes the Twitter API call specified in the HTTP_X_*
   headers,
verifying the user
5. On success, TwitPic sends you in its response information about the
   media
you just uploaded on behalf of your user
6. You take that response and append it to a tweet, or whatever other 
API
operation you're doing, and send a brand new request to Twitter

Is this the flow you're following or are you trying to do something 
else?

Taylor

On Sat, Jun 19, 2010 at 12:40 PM, Tim Millwood 
   t...@millwoodonline.co.ukwrote:

 So... I now have a test app which is sending oAuth Echo request
 successfully to Twitpic.

 If I change the URL to my web app I get a 401 error back from Twitter,
 so there is something I am doing wrong.

 I am getting the HTTP_X_AUTH_SERVICE_PROVIDER and
 HTTP_X_VERIFY_CREDENTIALS_AUTHORIZATION headers from the test app,
 then my web app is renaming the
 HTTP_X_VERIFY_CREDENTIALS_AUTHORIZATION header to Authorization and
 POSTing both to the URL in HTTP_X_AUTH_SERVICE_PROVIDER.

 This returns the 401 error.

 On Jun 17, 2:44 pm, Taylor Singletary taylorsinglet...@twitter.com
 wrote:
  Hi Tim,

  I'm not familiar with the Drupal OAuth module, but can help you a
   little
  bit.

  Hopefully that module is a bit flexible in the different approaches
   you
 can
  use to perform OAuth with it. Essentially, you need to build a mock
  request that you won't actually execute against an endpoint at
   Twitter
  using your credentials. The canon for OAuth Echo right now is to
   build a
 GET
  request tohttp://
   api.twitter.com/1/account/verify_credentials.json--but
  essentially, you can use any resource you want (and the OAuth Echo
   proxy
  provider could do something with the response in conjunction with
   your
  request -- TwitPic, yFrog, etc. are only just one possibility of the
 things
  you can do with OAuth Echo.

  I edited up a good example in simple PHP of using OAuth Echo against

Re: [twitter-dev] Re: Oauth Echo and Drupal

2010-06-21 Thread Taylor Singletary
Hi Tim,

That sounds like your machine might be having some issues connecting via
SSL. Are you able to use Curl for any other SSL-based sites?

Taylor

On Mon, Jun 21, 2010 at 11:57 AM, Tim Millwood t...@millwoodonline.co.ukwrote:

 Tried using Curl instead of drupal_http_request and got the following
 error.

 error setting certificate verify locations:\n  CAfile: \/etc\/ssl\/
 certs\/ca-certificates.crt\n  CApath: none\n

 Not sure what that means

 On Jun 21, 4:40 pm, Tim Millwood t...@millwoodonline.co.uk wrote:
  I have a test air app that posts to Twitpic perfectly fine using oAuth
  Echo, if I change the URL to my web app I get 401.
 
  Here are the headers I am passing to twitter to verify credentials. Am
  I missing some?
 
  [HTTP_X_AUTH_SERVICE_PROVIDER] =
 https://api.twitter.com/1/account/verify_credentials.json
 
  [Authorization] = OAuth
 
 realm=twitter,oauth_consumer_key=t94eBtc4Pz2zqo4KhABseQ,oauth_token=62
 66632-
 
 e0NRaGReqpzR84Floyg565BMJbBH4lYMxsJD9LNZY,oauth_version=1.0,oauth_timest
 amp=1276986312,oauth_nonce=KhWw0N,oauth_signature_method=HMAC-
  SHA1,oauth_signature=ubKN3OQy8xC5Sdkn%2BD%2Bcq9c1ywY%3D
 
  Tim
 
  On Jun 21, 4:28 pm, Taylor Singletary taylorsinglet...@twitter.com
  wrote:
 
 
 
   Awesome. There's much untapped potential in OAuth Echo beyond just the
   TwitPic, yFrog, etc. use cases.
 
   This is an area where you're going to have to be very exacting. Have
 you
   confirmed that the request you are building would actually execute
 against
   Twitter correctly before you've sent it through your process? As in,
 have
   you verified that the HTTP Authorization header you've created will
 work
   against the end point before you've stuffed it into some other header,
   processed the request, etc.
 
   Can you share the authorization header you are using and how you've
 defined
   the OAuth Echo headers? Your signature base string for the same?
 
   Taylor
 
   On Mon, Jun 21, 2010 at 8:06 AM, Tim Millwood 
 t...@millwoodonline.co.ukwrote:
 
I am trying to do something else.
 
I am not trying post to twitpic, I am trying to post to my own web
 app
(similar to twitpic).
 
I am getting the HTTP_X_AUTH_SERVICE_PROVIDER and
HTTP_X_VERIFY_CREDENTIALS_AUTHORIZATION headers from the test app,
then my web app is renaming the
HTTP_X_VERIFY_CREDENTIALS_AUTHORIZATION header to Authorization and
POSTing both to the URL in HTTP_X_AUTH_SERVICE_PROVIDER.
This returns the 401 error.
 
On Jun 21, 3:11 pm, Taylor Singletary taylorsinglet...@twitter.com
wrote:
 Hi Tim,
 
 The call specified in your HTTP_X_* headers is for the OAuth Echo
provider
 to execute against the API. Since they execute the call, it
 invalidates
the
 oauth_nonce you provided. Really, it's a different API call that
 your
 application should be executing following an OAuth Echo
 transaction..
 
 1. You've got something to post with TwitPic
 2. You setup a mock request to Twitter to verify credentials so
 that
TwitPic
 can identify your user with Twitter
 3. You send that mock request in HTTP_X_* headers to Twitpic, along
 with
 your API request to Twitpic with the image
 4. TwitPic executes the Twitter API call specified in the HTTP_X_*
headers,
 verifying the user
 5. On success, TwitPic sends you in its response information about
 the
media
 you just uploaded on behalf of your user
 6. You take that response and append it to a tweet, or whatever
 other API
 operation you're doing, and send a brand new request to Twitter
 
 Is this the flow you're following or are you trying to do something
 else?
 
 Taylor
 
 On Sat, Jun 19, 2010 at 12:40 PM, Tim Millwood 
t...@millwoodonline.co.ukwrote:
 
  So... I now have a test app which is sending oAuth Echo request
  successfully to Twitpic.
 
  If I change the URL to my web app I get a 401 error back from
 Twitter,
  so there is something I am doing wrong.
 
  I am getting the HTTP_X_AUTH_SERVICE_PROVIDER and
  HTTP_X_VERIFY_CREDENTIALS_AUTHORIZATION headers from the test
 app,
  then my web app is renaming the
  HTTP_X_VERIFY_CREDENTIALS_AUTHORIZATION header to Authorization
 and
  POSTing both to the URL in HTTP_X_AUTH_SERVICE_PROVIDER.
 
  This returns the 401 error.
 
  On Jun 17, 2:44 pm, Taylor Singletary 
 taylorsinglet...@twitter.com
  wrote:
   Hi Tim,
 
   I'm not familiar with the Drupal OAuth module, but can help you
 a
little
   bit.
 
   Hopefully that module is a bit flexible in the different
 approaches
you
  can
   use to perform OAuth with it. Essentially, you need to build a
 mock
   request that you won't actually execute against an endpoint at
Twitter
   using your credentials. The canon for OAuth Echo right now is
 to
build a
  GET
   request tohttp://

[twitter-dev] Statuses getting lost when user is not logged

2010-06-21 Thread dirs
Hi,

I've a RT widget and use http://twitter.com/home/?status=; to send
user to twitter with the tweetbox with content. Works great, but when
user aren't logged Twitter seems to didn't redirect the status
parameter.

I think that this happened before.

thxbye


[twitter-dev] Re: oAuth and Direct Message

2010-06-21 Thread themattharris
Hey Dave,

Looking through your signature base string just a couple of things
which jump out and would be worth checking:
* There are some spaces in the nonce and timestamp where there
shouldn't be. In all honesty this is most likely email formatting
problems but I wanted to point it out just in case.
* Your text is encoded three times which isn't good and could be the
source of the problem depending on what else you are doing when you
send your request. I want to rule it out as a symptom so can you take
a look at that, and why it is encoded one extra time. When I run tests
I see my text string similar to text%3Djust%2520a%2520simple
%2520message%2520test. yours, in it's current encoding, would read as
just%252520a%252520simple%252520message%252520test.

Matt

On Jun 18, 9:54 am, Acme Dave acmedav...@gmail.com wrote:
 Thanks Matt,

 I am still having problems. Here is the output of my test app.
 I am able to update status. So I know my POST logic is working correctly.

 Info sigBase: POSThttp%3A%2F%2Fapi.twitter.com
 %2F1%2Fdirect_messages%2Fnew.xmloauth_consumer_key%3DCKEY%26oauth_nonce%3D 
 5855976111049200858%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp% 
 3D1276879684%26oauth_token%3DATOKEN%26oauth_version%3D1.0%26text%3Dyes%2525 
 20very%252520good%252520message%26user%3DTOUSER

 Info url:http://api.twitter.com/1/direct_messages/new.xml

 ERROR during token access exchange: java.io.IOException: Server returned
 HTTP response code: 401 for 
 URL:http://api.twitter.com/1/direct_messages/new.xml

 Extended error response: ?xml version=1.0 encoding=UTF-8?hash
 request/1/direct_messages/new.xml/request  errorIncorrect
 signature/error/hash

 On Fri, Jun 18, 2010 at 9:21 AM, themattharris 
 thematthar...@twitter.comwrote:



  Hi Dave,

  I seemed to have missed your message originally. Are you still
  experiencing problems with this?

  In answer to your question there isn't anything special required for
  signing requests to send direct messages. If you are still having
  problems can you provide us with your signature base string (without
  any tokens/keys).

  Matt

  On Jun 11, 9:32 am, ds acmedav...@gmail.com wrote:
   I am having trouble sending a direct message with:
 http://api.twitter.com/1/direct_messages/new.xml

   I have been able to successfully post status updates with my code
   using oAuth.
   I have a java based custom application that is working fine for these
   updates.

   When trying to post a direct message I get 402 errors with incorrect
   signature.

   Basically I am using the same signature generation as update except I
   replace
   status with text and add user at the bottom of signature generation.
   Just like
   the oAuth example page on twitter.

   Then I pass the two parameters in the request body.

   I also tried moving everything to url parameters but got the same
   error.

   Is there anything special about parameters for direct message when
   using
   oAuth?

   Does it sound like I am doing this correctly with my post/body method?

   Thanks,
   ...Dave


Re: [twitter-dev] Statuses getting lost when user is not logged

2010-06-21 Thread Taylor Singletary
This should be fixed soon.. (hopefully today even)

You can follow the bug here.
http://code.google.com/p/twitter-api/issues/detail?id=1650q=logged%20outcolspec=ID%20Stars%20Type%20Status%20Priority%20Owner%20Summary%20Opened%20Modified%20Component



On Mon, Jun 21, 2010 at 11:59 AM, dirs dirc...@gmail.com wrote:

 Hi,

 I've a RT widget and use http://twitter.com/home/?status=; to send
 user to twitter with the tweetbox with content. Works great, but when
 user aren't logged Twitter seems to didn't redirect the status
 parameter.

 I think that this happened before.

 thxbye



[twitter-dev] Re: Oauth Echo and Drupal

2010-06-21 Thread themattharris
Hi Tim,

That error you are getting is often thrown when curl tries to verify
the remote host. You can bypass this check in PHP using:
  curl_setopt($link, CURLOPT_SSL_VERIFYPEER, FALSE);
BUT this isn't ideal as it only hides the problem on your server.

Instead, what you need to do is check the permissions on your server
in the certificates folder. Reading the error message you get it
implies your certificate folder is:
  /etc/ssl/certs/ca-certificates.crt

We can't help specifically on how to do this for your environment but
your hosting provider should be able to help you.

Hope that helps,
Matt

On Jun 21, 11:59 am, Taylor Singletary taylorsinglet...@twitter.com
wrote:
 Hi Tim,

 That sounds like your machine might be having some issues connecting via
 SSL. Are you able to use Curl for any other SSL-based sites?

 Taylor

 On Mon, Jun 21, 2010 at 11:57 AM, Tim Millwood 
 t...@millwoodonline.co.ukwrote:



  Tried using Curl instead of drupal_http_request and got the following
  error.

  error setting certificate verify locations:\n  CAfile: \/etc\/ssl\/
  certs\/ca-certificates.crt\n  CApath: none\n

  Not sure what that means

  On Jun 21, 4:40 pm, Tim Millwood t...@millwoodonline.co.uk wrote:
   I have a test air app that posts to Twitpic perfectly fine using oAuth
   Echo, if I change the URL to my web app I get 401.

   Here are the headers I am passing to twitter to verify credentials. Am
   I missing some?

   [HTTP_X_AUTH_SERVICE_PROVIDER] =
 https://api.twitter.com/1/account/verify_credentials.json

   [Authorization] = OAuth

  realm=twitter,oauth_consumer_key=t94eBtc4Pz2zqo4KhABseQ,oauth_token=62
  66632-

  e0NRaGReqpzR84Floyg565BMJbBH4lYMxsJD9LNZY,oauth_version=1.0,oauth_timest
  amp=1276986312,oauth_nonce=KhWw0N,oauth_signature_method=HMAC-
   SHA1,oauth_signature=ubKN3OQy8xC5Sdkn%2BD%2Bcq9c1ywY%3D

   Tim

   On Jun 21, 4:28 pm, Taylor Singletary taylorsinglet...@twitter.com
   wrote:

Awesome. There's much untapped potential in OAuth Echo beyond just the
TwitPic, yFrog, etc. use cases.

This is an area where you're going to have to be very exacting. Have
  you
confirmed that the request you are building would actually execute
  against
Twitter correctly before you've sent it through your process? As in,
  have
you verified that the HTTP Authorization header you've created will
  work
against the end point before you've stuffed it into some other header,
processed the request, etc.

Can you share the authorization header you are using and how you've
  defined
the OAuth Echo headers? Your signature base string for the same?

Taylor

On Mon, Jun 21, 2010 at 8:06 AM, Tim Millwood 
  t...@millwoodonline.co.ukwrote:

 I am trying to do something else.

 I am not trying post to twitpic, I am trying to post to my own web
  app
 (similar to twitpic).

 I am getting the HTTP_X_AUTH_SERVICE_PROVIDER and
 HTTP_X_VERIFY_CREDENTIALS_AUTHORIZATION headers from the test app,
 then my web app is renaming the
 HTTP_X_VERIFY_CREDENTIALS_AUTHORIZATION header to Authorization and
 POSTing both to the URL in HTTP_X_AUTH_SERVICE_PROVIDER.
 This returns the 401 error.

 On Jun 21, 3:11 pm, Taylor Singletary taylorsinglet...@twitter.com
 wrote:
  Hi Tim,

  The call specified in your HTTP_X_* headers is for the OAuth Echo
 provider
  to execute against the API. Since they execute the call, it
  invalidates
 the
  oauth_nonce you provided. Really, it's a different API call that
  your
  application should be executing following an OAuth Echo
  transaction..

  1. You've got something to post with TwitPic
  2. You setup a mock request to Twitter to verify credentials so
  that
 TwitPic
  can identify your user with Twitter
  3. You send that mock request in HTTP_X_* headers to Twitpic, along
  with
  your API request to Twitpic with the image
  4. TwitPic executes the Twitter API call specified in the HTTP_X_*
 headers,
  verifying the user
  5. On success, TwitPic sends you in its response information about
  the
 media
  you just uploaded on behalf of your user
  6. You take that response and append it to a tweet, or whatever
  other API
  operation you're doing, and send a brand new request to Twitter

  Is this the flow you're following or are you trying to do something
  else?

  Taylor

  On Sat, Jun 19, 2010 at 12:40 PM, Tim Millwood 
 t...@millwoodonline.co.ukwrote:

   So... I now have a test app which is sending oAuth Echo request
   successfully to Twitpic.

   If I change the URL to my web app I get a 401 error back from
  Twitter,
   so there is something I am doing wrong.

   I am getting the HTTP_X_AUTH_SERVICE_PROVIDER and
   HTTP_X_VERIFY_CREDENTIALS_AUTHORIZATION headers from the test
  app,
   then my web app is renaming the
   HTTP_X_VERIFY_CREDENTIALS_AUTHORIZATION header 

[twitter-dev] Re: Oauth Echo and Drupal

2010-06-21 Thread Tim Millwood
curl_setopt($link, CURLOPT_SSL_VERIFYPEER, FALSE); This worked!

Now I get the error Failed to open\/read local data from file\/
application.

On Jun 21, 8:20 pm, themattharris thematthar...@twitter.com wrote:
 Hi Tim,

 That error you are getting is often thrown when curl tries to verify
 the remote host. You can bypass this check in PHP using:
   curl_setopt($link, CURLOPT_SSL_VERIFYPEER, FALSE);
 BUT this isn't ideal as it only hides the problem on your server.

 Instead, what you need to do is check the permissions on your server
 in the certificates folder. Reading the error message you get it
 implies your certificate folder is:
   /etc/ssl/certs/ca-certificates.crt

 We can't help specifically on how to do this for your environment but
 your hosting provider should be able to help you.

 Hope that helps,
 Matt

 On Jun 21, 11:59 am, Taylor Singletary taylorsinglet...@twitter.com
 wrote:



  Hi Tim,

  That sounds like your machine might be having some issues connecting via
  SSL. Are you able to use Curl for any other SSL-based sites?

  Taylor

  On Mon, Jun 21, 2010 at 11:57 AM, Tim Millwood 
  t...@millwoodonline.co.ukwrote:

   Tried using Curl instead of drupal_http_request and got the following
   error.

   error setting certificate verify locations:\n  CAfile: \/etc\/ssl\/
   certs\/ca-certificates.crt\n  CApath: none\n

   Not sure what that means

   On Jun 21, 4:40 pm, Tim Millwood t...@millwoodonline.co.uk wrote:
I have a test air app that posts to Twitpic perfectly fine using oAuth
Echo, if I change the URL to my web app I get 401.

Here are the headers I am passing to twitter to verify credentials. Am
I missing some?

[HTTP_X_AUTH_SERVICE_PROVIDER] =
  https://api.twitter.com/1/account/verify_credentials.json

[Authorization] = OAuth

   realm=twitter,oauth_consumer_key=t94eBtc4Pz2zqo4KhABseQ,oauth_token=62
   66632-

   e0NRaGReqpzR84Floyg565BMJbBH4lYMxsJD9LNZY,oauth_version=1.0,oauth_timest
   amp=1276986312,oauth_nonce=KhWw0N,oauth_signature_method=HMAC-
SHA1,oauth_signature=ubKN3OQy8xC5Sdkn%2BD%2Bcq9c1ywY%3D

Tim

On Jun 21, 4:28 pm, Taylor Singletary taylorsinglet...@twitter.com
wrote:

 Awesome. There's much untapped potential in OAuth Echo beyond just the
 TwitPic, yFrog, etc. use cases.

 This is an area where you're going to have to be very exacting. Have
   you
 confirmed that the request you are building would actually execute
   against
 Twitter correctly before you've sent it through your process? As in,
   have
 you verified that the HTTP Authorization header you've created will
   work
 against the end point before you've stuffed it into some other header,
 processed the request, etc.

 Can you share the authorization header you are using and how you've
   defined
 the OAuth Echo headers? Your signature base string for the same?

 Taylor

 On Mon, Jun 21, 2010 at 8:06 AM, Tim Millwood 
   t...@millwoodonline.co.ukwrote:

  I am trying to do something else.

  I am not trying post to twitpic, I am trying to post to my own web
   app
  (similar to twitpic).

  I am getting the HTTP_X_AUTH_SERVICE_PROVIDER and
  HTTP_X_VERIFY_CREDENTIALS_AUTHORIZATION headers from the test app,
  then my web app is renaming the
  HTTP_X_VERIFY_CREDENTIALS_AUTHORIZATION header to Authorization and
  POSTing both to the URL in HTTP_X_AUTH_SERVICE_PROVIDER.
  This returns the 401 error.

  On Jun 21, 3:11 pm, Taylor Singletary taylorsinglet...@twitter.com
  wrote:
   Hi Tim,

   The call specified in your HTTP_X_* headers is for the OAuth Echo
  provider
   to execute against the API. Since they execute the call, it
   invalidates
  the
   oauth_nonce you provided. Really, it's a different API call that
   your
   application should be executing following an OAuth Echo
   transaction..

   1. You've got something to post with TwitPic
   2. You setup a mock request to Twitter to verify credentials so
   that
  TwitPic
   can identify your user with Twitter
   3. You send that mock request in HTTP_X_* headers to Twitpic, 
   along
   with
   your API request to Twitpic with the image
   4. TwitPic executes the Twitter API call specified in the HTTP_X_*
  headers,
   verifying the user
   5. On success, TwitPic sends you in its response information about
   the
  media
   you just uploaded on behalf of your user
   6. You take that response and append it to a tweet, or whatever
   other API
   operation you're doing, and send a brand new request to Twitter

   Is this the flow you're following or are you trying to do 
   something
   else?

   Taylor

   On Sat, Jun 19, 2010 at 12:40 PM, Tim Millwood 
  t...@millwoodonline.co.ukwrote:

So... I now have a test app which is sending oAuth Echo request
successfully to Twitpic.

If I change 

[twitter-dev] Re: Oauth Echo and Drupal

2010-06-21 Thread Tim Millwood
Removed curl_setopt($curl, CURLOPT_POST, 1); and it worked. Yay!

http://drippic.com will be oAuth echo compatible within the next 24
hours.

On Jun 21, 8:24 pm, Tim Millwood t...@millwoodonline.co.uk wrote:
 curl_setopt($link, CURLOPT_SSL_VERIFYPEER, FALSE); This worked!

 Now I get the error Failed to open\/read local data from file\/
 application.

 On Jun 21, 8:20 pm, themattharris thematthar...@twitter.com wrote:



  Hi Tim,

  That error you are getting is often thrown when curl tries to verify
  the remote host. You can bypass this check in PHP using:
    curl_setopt($link, CURLOPT_SSL_VERIFYPEER, FALSE);
  BUT this isn't ideal as it only hides the problem on your server.

  Instead, what you need to do is check the permissions on your server
  in the certificates folder. Reading the error message you get it
  implies your certificate folder is:
    /etc/ssl/certs/ca-certificates.crt

  We can't help specifically on how to do this for your environment but
  your hosting provider should be able to help you.

  Hope that helps,
  Matt

  On Jun 21, 11:59 am, Taylor Singletary taylorsinglet...@twitter.com
  wrote:

   Hi Tim,

   That sounds like your machine might be having some issues connecting via
   SSL. Are you able to use Curl for any other SSL-based sites?

   Taylor

   On Mon, Jun 21, 2010 at 11:57 AM, Tim Millwood 
   t...@millwoodonline.co.ukwrote:

Tried using Curl instead of drupal_http_request and got the following
error.

error setting certificate verify locations:\n  CAfile: \/etc\/ssl\/
certs\/ca-certificates.crt\n  CApath: none\n

Not sure what that means

On Jun 21, 4:40 pm, Tim Millwood t...@millwoodonline.co.uk wrote:
 I have a test air app that posts to Twitpic perfectly fine using oAuth
 Echo, if I change the URL to my web app I get 401.

 Here are the headers I am passing to twitter to verify credentials. Am
 I missing some?

 [HTTP_X_AUTH_SERVICE_PROVIDER] =
   https://api.twitter.com/1/account/verify_credentials.json

 [Authorization] = OAuth

realm=twitter,oauth_consumer_key=t94eBtc4Pz2zqo4KhABseQ,oauth_token=62
66632-

e0NRaGReqpzR84Floyg565BMJbBH4lYMxsJD9LNZY,oauth_version=1.0,oauth_timest
amp=1276986312,oauth_nonce=KhWw0N,oauth_signature_method=HMAC-
 SHA1,oauth_signature=ubKN3OQy8xC5Sdkn%2BD%2Bcq9c1ywY%3D

 Tim

 On Jun 21, 4:28 pm, Taylor Singletary taylorsinglet...@twitter.com
 wrote:

  Awesome. There's much untapped potential in OAuth Echo beyond just 
  the
  TwitPic, yFrog, etc. use cases.

  This is an area where you're going to have to be very exacting. Have
you
  confirmed that the request you are building would actually execute
against
  Twitter correctly before you've sent it through your process? As in,
have
  you verified that the HTTP Authorization header you've created will
work
  against the end point before you've stuffed it into some other 
  header,
  processed the request, etc.

  Can you share the authorization header you are using and how you've
defined
  the OAuth Echo headers? Your signature base string for the same?

  Taylor

  On Mon, Jun 21, 2010 at 8:06 AM, Tim Millwood 
t...@millwoodonline.co.ukwrote:

   I am trying to do something else.

   I am not trying post to twitpic, I am trying to post to my own web
app
   (similar to twitpic).

   I am getting the HTTP_X_AUTH_SERVICE_PROVIDER and
   HTTP_X_VERIFY_CREDENTIALS_AUTHORIZATION headers from the test app,
   then my web app is renaming the
   HTTP_X_VERIFY_CREDENTIALS_AUTHORIZATION header to Authorization 
   and
   POSTing both to the URL in HTTP_X_AUTH_SERVICE_PROVIDER.
   This returns the 401 error.

   On Jun 21, 3:11 pm, Taylor Singletary 
   taylorsinglet...@twitter.com
   wrote:
Hi Tim,

The call specified in your HTTP_X_* headers is for the OAuth 
Echo
   provider
to execute against the API. Since they execute the call, it
invalidates
   the
oauth_nonce you provided. Really, it's a different API call that
your
application should be executing following an OAuth Echo
transaction..

1. You've got something to post with TwitPic
2. You setup a mock request to Twitter to verify credentials so
that
   TwitPic
can identify your user with Twitter
3. You send that mock request in HTTP_X_* headers to Twitpic, 
along
with
your API request to Twitpic with the image
4. TwitPic executes the Twitter API call specified in the 
HTTP_X_*
   headers,
verifying the user
5. On success, TwitPic sends you in its response information 
about
the
   media
you just uploaded on behalf of your user
6. You take that response and append it to a tweet, or whatever
other API
operation you're 

[twitter-dev] Which IETF standard has the year appearing after the time?

2010-06-21 Thread Peter Cross
This date is from a call to http://api.twitter.com/1/statuses/user_timeline.xml:

created_atMon Jun 21 19:06:21 + 2010/created_at

begin rant

I've never seen the year come after the time... in any standard date
format.  It's as if someone thought Hmmm... how can we make this date
format more difficult to work with?.  Why, why why?  Now I have to
write a special handler for this one exception.  It's sloppy.

/end rant

This isn't an XML standard date format either.

-ZPC


[twitter-dev] Re: oAuth and Direct Message

2010-06-21 Thread ds
I solved the problem.

I did not have an  between my two parameters in the POST body.

Adding  between the text and user parameter fixed it.

Thanks Matt.

On Jun 21, 1:10 pm, themattharris thematthar...@twitter.com wrote:
 Hey Dave,

 Looking through your signature base string just a couple of things
 which jump out and would be worth checking:
 * There are some spaces in the nonce and timestamp where there
 shouldn't be. In all honesty this is most likely email formatting
 problems but I wanted to point it out just in case.
 * Your text is encoded three times which isn't good and could be the
 source of the problem depending on what else you are doing when you
 send your request. I want to rule it out as a symptom so can you take
 a look at that, and why it is encoded one extra time. When I run tests
 I see my text string similar to text%3Djust%2520a%2520simple
 %2520message%2520test. yours, in it's current encoding, would read as
 just%252520a%252520simple%252520message%252520test.

 Matt

 On Jun 18, 9:54 am, Acme Dave acmedav...@gmail.com wrote:



  Thanks Matt,

  I am still having problems. Here is the output of my test app.
  I am able to update status. So I know my POST logic is working correctly.

  Info sigBase: POSThttp%3A%2F%2Fapi.twitter.com
  %2F1%2Fdirect_messages%2Fnew.xmloauth_consumer_key%3DCKEY%26oauth_nonce%3D 
  5855976111049200858%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp% 
  3D1276879684%26oauth_token%3DATOKEN%26oauth_version%3D1.0%26text%3Dyes%2525 
  20very%252520good%252520message%26user%3DTOUSER

  Info url:http://api.twitter.com/1/direct_messages/new.xml

  ERROR during token access exchange: java.io.IOException: Server returned
  HTTP response code: 401 for 
  URL:http://api.twitter.com/1/direct_messages/new.xml

  Extended error response: ?xml version=1.0 encoding=UTF-8?hash
  request/1/direct_messages/new.xml/request  errorIncorrect
  signature/error/hash

  On Fri, Jun 18, 2010 at 9:21 AM, themattharris 
  thematthar...@twitter.comwrote:

   Hi Dave,

   I seemed to have missed your message originally. Are you still
   experiencing problems with this?

   In answer to your question there isn't anything special required for
   signing requests to send direct messages. If you are still having
   problems can you provide us with your signature base string (without
   any tokens/keys).

   Matt

   On Jun 11, 9:32 am, ds acmedav...@gmail.com wrote:
I am having trouble sending a direct message with:
  http://api.twitter.com/1/direct_messages/new.xml

I have been able to successfully post status updates with my code
using oAuth.
I have a java based custom application that is working fine for these
updates.

When trying to post a direct message I get 402 errors with incorrect
signature.

Basically I am using the same signature generation as update except I
replace
status with text and add user at the bottom of signature generation.
Just like
the oAuth example page on twitter.

Then I pass the two parameters in the request body.

I also tried moving everything to url parameters but got the same
error.

Is there anything special about parameters for direct message when
using
oAuth?

Does it sound like I am doing this correctly with my post/body method?

Thanks,
...Dave


[twitter-dev] Re: Which IETF standard has the year appearing after the time?

2010-06-21 Thread themattharris
The time format is a little weird and as far as I know, doesn't match
any RFC. Instead it matches the ruby default and is represented in
tokens by:
  %a %b %d %H:%M:%S %Z %Y

The format has been like this since the API was first released which
means, for backwards compatibility with other applications, we can't
easily change it with this version of the API.

I hope that explains the why it is still in the format it is.
Hopefully you can use the token string above to parse the date using
the time parsing functions of your chosen language.

Matt

On Jun 21, 12:40 pm, Peter Cross zootl...@gmail.com wrote:
 This date is from a call 
 tohttp://api.twitter.com/1/statuses/user_timeline.xml:

 created_atMon Jun 21 19:06:21 + 2010/created_at

 begin rant

 I've never seen the year come after the time... in any standard date
 format.  It's as if someone thought Hmmm... how can we make this date
 format more difficult to work with?.  Why, why why?  Now I have to
 write a special handler for this one exception.  It's sloppy.

 /end rant

 This isn't an XML standard date format either.

 -ZPC


[twitter-dev] Re: oAuth and Direct Message

2010-06-21 Thread themattharris
Thanks for the update and sharing the solution Dave. I'm glad it's all
working.

Regarding nonce values. I recommend something like the MD5 of the
concatenation of some kind of time value with a random number/string
to ensure a unique nonce every time.

Hope that helps
Matt

On Jun 21, 1:11 pm, ds acmedav...@gmail.com wrote:
 I solved the problem.

 I did not have an  between my two parameters in the POST body.

 Adding  between the text and user parameter fixed it.

 Thanks Matt.

 On Jun 21, 1:10 pm, themattharris thematthar...@twitter.com wrote:



  Hey Dave,

  Looking through your signature base string just a couple of things
  which jump out and would be worth checking:
  * There are some spaces in the nonce and timestamp where there
  shouldn't be. In all honesty this is most likely email formatting
  problems but I wanted to point it out just in case.
  * Your text is encoded three times which isn't good and could be the
  source of the problem depending on what else you are doing when you
  send your request. I want to rule it out as a symptom so can you take
  a look at that, and why it is encoded one extra time. When I run tests
  I see my text string similar to text%3Djust%2520a%2520simple
  %2520message%2520test. yours, in it's current encoding, would read as
  just%252520a%252520simple%252520message%252520test.

  Matt

  On Jun 18, 9:54 am, Acme Dave acmedav...@gmail.com wrote:

   Thanks Matt,

   I am still having problems. Here is the output of my test app.
   I am able to update status. So I know my POST logic is working correctly.

   Info sigBase: POSThttp%3A%2F%2Fapi.twitter.com
   %2F1%2Fdirect_messages%2Fnew.xmloauth_consumer_key%3DCKEY%26oauth_nonce%3D

   5855976111049200858%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%

   3D1276879684%26oauth_token%3DATOKEN%26oauth_version%3D1.0%26text%3Dyes%2525
20very%252520good%252520message%26user%3DTOUSER

   Info url:http://api.twitter.com/1/direct_messages/new.xml

   ERROR during token access exchange: java.io.IOException: Server returned
   HTTP response code: 401 for 
   URL:http://api.twitter.com/1/direct_messages/new.xml

   Extended error response: ?xml version=1.0 encoding=UTF-8?hash
   request/1/direct_messages/new.xml/request  errorIncorrect
   signature/error/hash

   On Fri, Jun 18, 2010 at 9:21 AM, themattharris 
   thematthar...@twitter.comwrote:

Hi Dave,

I seemed to have missed your message originally. Are you still
experiencing problems with this?

In answer to your question there isn't anything special required for
signing requests to send direct messages. If you are still having
problems can you provide us with your signature base string (without
any tokens/keys).

Matt

On Jun 11, 9:32 am, ds acmedav...@gmail.com wrote:
 I am having trouble sending a direct message with:
   http://api.twitter.com/1/direct_messages/new.xml

 I have been able to successfully post status updates with my code
 using oAuth.
 I have a java based custom application that is working fine for these
 updates.

 When trying to post a direct message I get 402 errors with incorrect
 signature.

 Basically I am using the same signature generation as update except I
 replace
 status with text and add user at the bottom of signature generation.
 Just like
 the oAuth example page on twitter.

 Then I pass the two parameters in the request body.

 I also tried moving everything to url parameters but got the same
 error.

 Is there anything special about parameters for direct message when
 using
 oAuth?

 Does it sound like I am doing this correctly with my post/body method?

 Thanks,
 ...Dave


[twitter-dev] Re: Rate Limiting with desktop applications using C# HttpRequest

2010-06-21 Thread Jian Lu
Alright, I figured it out...

The problem is I am using basic access authentication (I know.. my
bad... OAuth it is... I swear I will switch to that...). But C#
HttpWebRequest doesn't pack up the basic access Authentication
credential into the headers unless you program it to. Therefore the
GET calls from my program goes unauthenticated and falls into the
quota of my IP.

here are three links helped me:

http://forums.silverlight.net/forums/t/18631.aspx
http://en.wikipedia.org/wiki/Basic_access_authentication
http://geekswithblogs.net/dtotzke/articles/24571.aspx

the trick in the last link works. MAKE SURE to attach Basic in front
of your Base64 string of username/password pair in your header
value I came up with the same workaround but missed that piece,
and I almost thought it didn't work until I found my problem by
reading the last link

Now all my calls is counted against my account quota. Nice.

-Jian


On Jun 21, 10:52 am, Jian Lu tristan@gmail.com wrote:
 I have whitelisted my account (but no ip), and am sending requests
 through my desktop application by wrapping my credentials with C#
 HttpRequest.

 Very frequently, using the method above, I see my rates drop back to
 150/hour and it drains out even I am not making any calls. Here is a
 sample reponse I got by checking my rate limit:

 {
     remaining_hits = 0,
     hourly_limit = 150,
     reset_time_in_seconds = 1277141653,
     reset_time = Mon Jun 21 17:34:13 + 2010

 }

 But strangely if I submit my rate-checking request on the SAME MACHINE
 at the SAME TIME through curl, I got the correct limit, and it doesn't
 automatically drain out if I don't make api request:

 {reset_time_in_seconds:1277145186,remaining_hits:
 2,reset_time:Mon Jun 21 18:33:06 + 2010,hourly_limit:
 2}

 The pattern I am seeing is:

 1a. Right after limit RESET, if I query my rate limit through my C#
 HttpRequest code, I get my whitelisted rates. BUT it drains out
 automatically and quickly even I am not using it at all...

 1b. But if I use curl to do a query to check my rate limit, even
 though the checking in #1a shows something lower than my real usage,
 the result returned from curl is always correct and equal to my real
 usage.

 3. When that limit drains out, I started to get the 150/hour limit
 response but the remaining hits is 0 by issuing C# HttpRequests.

 What I suspected is it has something to do with my network setting. I
 am behind my company domain and maybe different machines within my
 company network have the same external IP?

 Is there any way to avoid that?

 -Jian


Re: [twitter-dev] Twitter Places

2010-06-21 Thread David Helder
Sure, you can use the search method to find the place ID:
http://dev.twitter.com/doc/get/geo/search

Then set the place_id argument to /statuses/update to tweet from that place:
http://dev.twitter.com/doc/post/statuses/update

David


On Sun, Jun 20, 2010 at 9:01 PM, ELB ebrit...@gmail.com wrote:
 Hello,

 I read on the Twitter blog that: (http://blog.twitter.com/2010/06/
 twitter-places-more-context-for-your.html)

 We are releasing API functionality that lets developers integrate
 Twitter Places into their applications.“

 I wanted to check in to see where we could learn about what
 functionality has been released.  We have 100 places, ie:  Staples
 Center, LAX Airport, Grand Central Terminal, etc that we want to
 publish Tweets from.  Are we able to use the Twitter API to publish
 the current Tweets from a given place?

 if so, where in the API is the documentation to do this?

 ELB




Re: [twitter-dev] Twitter Places

2010-06-21 Thread Damon Clinkscales
David,

Thanks. That first page (the 'geo search') is blank.

/damon

On Mon, Jun 21, 2010 at 5:19 PM, David Helder da...@twitter.com wrote:
 Sure, you can use the search method to find the place ID:
 http://dev.twitter.com/doc/get/geo/search

 Then set the place_id argument to /statuses/update to tweet from that place:
 http://dev.twitter.com/doc/post/statuses/update

 David


Re: [twitter-dev] Re: Which IETF standard has the year appearing after the time?

2010-06-21 Thread Bernd Stramm
On Mon, 21 Jun 2010 13:37:12 -0700 (PDT)
themattharris thematthar...@twitter.com wrote:

 The time format is a little weird and as far as I know, doesn't match
 any RFC. Instead it matches the ruby default and is represented in
 tokens by:
   %a %b %d %H:%M:%S %Z %Y

which leads to the next question:

why is that the Ruby default? Did they Ruby author forget the year and
then decided to tack it on the end?

-- 
Bernd Stramm
bernd.str...@gmail.com



Re: [twitter-dev] Twitter Places

2010-06-21 Thread Taylor Singletary
Thanks Damon, looks like the memcache got screwy. I'll get it back up!

Taylor

On Mon, Jun 21, 2010 at 3:32 PM, Damon Clinkscales sca...@pobox.com wrote:

 David,

 Thanks. That first page (the 'geo search') is blank.

 /damon

 On Mon, Jun 21, 2010 at 5:19 PM, David Helder da...@twitter.com wrote:
  Sure, you can use the search method to find the place ID:
  http://dev.twitter.com/doc/get/geo/search
 
  Then set the place_id argument to /statuses/update to tweet from that
 place:
  http://dev.twitter.com/doc/post/statuses/update
 
  David



[twitter-dev] Re: mentions API broken?

2010-06-21 Thread Mark Sievers
Hey Taylor,

Thanks for the response.

Yup, still seeing the problem for that block of time/mentions, but
subsequent mentions are coming through okay.

Not causing me any particular distress, just thought I would raise it!
I'll keep an eye out and update this thread if anything changes.

Cheers

M


Re: [twitter-dev] Re: Recent Places-related API enhancements more to come...

2010-06-21 Thread David Helder
The geo field is the user's (or tweet's) exact location.  The place
field, whether a POI, neighborhood, city, or admin, contains the
place's location.  Today POIs are always points, but in the future
there may be some polygons (e.g. stadiums, malls, amusement parks).
In this case the exact location would matter.

A place-annotated tweet will show up in the streaming API, even if
it doesn't have an exact location.

David
Twitter Geo Team


On Thu, Jun 17, 2010 at 3:28 PM, harrisj harrisj.h...@gmail.com wrote:
 Hello,

 Currently, using places doesn't modify the 'geo' field. This makes
 sense for neighborhoods or cities, because picking a centroid is a
 little arbitrary and those users might get freaked out if we place
 them at a specific point on a map. However, I would argue that this
 behavior is counterintuitive when we get to the 'poi' level. When I
 pick the building I'm in on twitter.com, I'm assuming I'm geocoding my
 location (and providing some additional semantic information beyond
 lat/lng). However, this doesn't seem to be the case. Would we consider
 changing this?

 Furthermore, will any place-annotated tweets show up in the streaming
 API when using the locations query parameters? Or is that only limited
 to explicitly geotagged tweets?

 Thanks,
 Jacob



[twitter-dev] trivial doubt

2010-06-21 Thread André Luís Moura Lima
Hello everybody,
I'm doing some tests with twitter widget profile...i do everything right on
the site,copy the resulting code to my html,but the twitter widget is not
shown,it isn't rendering.What can be wrong?for those who can help me,I will
post the code here.I guess I'm doing some confusion with some html tags like
body,head,html,etc...are they necessary to the code work right?anyway,i hope
so,cause this code that I'm posting is,obviously,an example...the real html
have head,body,html tags.anyway,here is the code:
div id = twitterdiv/div
script src=http://widgets.twimg.com/j/2/widget.js;/script
script
new TWTR.Widget({
  id : 'twitterdiv'
  version: 2,
  type: 'profile',
  rpp: 4,
  interval: 6000,
  width: 250,
  height: 300,
  theme: {
shell: {
  background: '#33',
  color: '#ff'
},
tweets: {
  background: '#00',
  color: '#ff',
  links: '#4aed05'
}
  },
  features: {
scrollbar: true,
loop: false,
live: false,
hashtags: true,
timestamp: true,
avatars: false,
behavior: 'all'
  }
}).render().setUser('andre').start();
/script


[twitter-dev] Wordpress 2.9.2 Buddypress TweetStream plugin call bacl FAIL

2010-06-21 Thread John Sullivan
Hi
I have a little blogging community running the above
Tweetstream was running great
then people told me when you tried to authorize twitter now it goes to
a white screen and hangs in the token process but doesn't finish
Any help would be appreciated
HIT me up on twitter
jsinkeywest
everything was working fine now ?
Thanks for real


[twitter-dev] Re: Wordpress 2.9.2 Buddypress TweetStream plugin call bacl FAIL

2010-06-21 Thread John Sullivan
Andy ideas I tried all the regular things to do
it all of a sudden goes to a white page I even tried a diff .htaccess
the people click to auth twitter once so they can tweet so it's pretty
important Thanks
You have had admin since day one
I reupped diff versions of the plugin reset the twitter api #
hmm ?
Thanks

On Mon, Jun 21, 2010 at 7:22 PM, John Sullivan jsinkeyw...@gmail.comwrote:

 Hi
 I have a little blogging community running the above
 Tweetstream was running great
 then people told me when you tried to authorize twitter now it goes to
 a white screen and hangs in the token process but doesn't finish
 Any help would be appreciated
 HIT me up on twitter
 jsinkeywest
 everything was working fine now ?
 Thanks for real




-- 
HOME of the KING
http://POTPOLITICS.COM
you know you want it;)
New Awesome Blogger Community
http://bloggerluv.com
All Bloggers welcome it has mad cool features to Promote YOU :) Thanks


Re: [twitter-dev] Which IETF standard has the year appearing after the time?

2010-06-21 Thread Andrew W. Donoho

On Jun 21, 2010, at 14:40 , Peter Cross wrote:

 This date is from a call to 
 http://api.twitter.com/1/statuses/user_timeline.xml:
 
 created_atMon Jun 21 19:06:21 + 2010/created_at
 
 begin rant

Elided

 /end rant
 
 This isn't an XML standard date format either.



It is a unicode compatible date. This format string is defined at: 
http://unicode.org/reports/tr35/tr35-6.html#Date_Format_Patterns

Here is the format I use to parse Twitter formats into my local time system: 
EEE MMM dd HH:mm:ss ZZZ y.

Anon,
Andrew

Andrew W. Donoho
Donoho Design Group, L.L.C.
a...@ddg.com, +1 (512) 750-7596

Knowing is not enough; we must apply. 
Willing is not enough; we must do.
-- Johann Wolfgang von Goethe