[twitter-dev] Follow/unfollow broken

2010-06-07 Thread Rich
Hi

Is anyone aware that follow/unfollow seems to be broken over oAuth

I've tested about 6 different apps and all fail. As expected Tweetie
still works but that's still basic auth I believe

Richard


[twitter-dev] How to find all the replies to a particular tweet

2010-06-07 Thread Dushyant
A user ( screen_name is known) posts a tweet (id is known). I want to
find out all the replies to this tweet. Which API method can help me
do this?


[twitter-dev] Re: How to find all the replies to a particular tweet

2010-06-07 Thread Dushyant
To make it more clear. There are 2 users. My friend posts a tweet and
obviously I do not know the authentication details for his account. I
want to use the API to find all the replies to the tweet he has
posted.

On Jun 7, 1:20 pm, Dushyant dushyantaror...@gmail.com wrote:
 A user ( screen_name is known) posts a tweet (id is known). I want to
 find out all the replies to this tweet.Which API method can help me
 do this?


Re: [twitter-dev] Follow/unfollow broken

2010-06-07 Thread Taylor Singletary
There was an outage over the weekend where this may have been the case
during a temporary period. Are you still seeing the issue?

Taylor Singletary
Developer Advocate, Twitter
http://twitter.com/episod


On Mon, Jun 7, 2010 at 12:09 AM, Rich rhyl...@gmail.com wrote:

 Hi

 Is anyone aware that follow/unfollow seems to be broken over oAuth

 I've tested about 6 different apps and all fail. As expected Tweetie
 still works but that's still basic auth I believe

 Richard



[twitter-dev] Re: OAuth Echo problem in python

2010-06-07 Thread Steve C
If you were seeing a 400 Bad Req, you were most likely sending a bad
upload to the API. We only return a 400 Bad Req if the image is not
found, the multipart form-data is malformed, or if the image is 5MB.

If Twitpic is having a service outage you will always get a 50x error
(502 or 500). If Twitter is having an OAuth Echo outage, you will get
a 401 Unauthorized from the Twitpic API.

Steve Corona
Twitpic

On Jun 4, 3:48 pm, yml yann.ma...@gmail.com wrote:
 At that point both services yfrog and twipic work fine. I hate to say
 this but I am almost convince that the pain in the development process
 comes from some outage in either twitpic or Twitter Oauth Echo
 authentication.

 for the sake of completeness of this thread here it is my 2 working
 views :http://dpaste.com/203292/

 Regards,
 --yml

 On Jun 4, 9:59 am, Yann Malet yann.ma...@gmail.com wrote:



  I have just uploaded the same image using the web interface 
  :http://twitpic.com/1ttrlu
  http://twitpic.com/1ttrludo you have any recommendation ? On how to solve
  this issue.
   http://twitpic.com/1ttrluRegards,
  --yml

  On Fri, Jun 4, 2010 at 9:56 AM, Yann Malet yann.ma...@gmail.com wrote:
   Steve,
   The image is only 33.7kb and it is  a jpg.
   Do you have any python sample code for the ?
   Regards,
   --yml

   On Fri, Jun 4, 2010 at 9:38 AM, Steve C st...@twitpic.com wrote:

   Twitpic will only 400 Bad Request you if it can't find the image in
   your multipart/form-
   data or if the image is invalid (not jpg/png/gif or 5MB in size).

   Thanks,

   Steve C
   Twitpic

   On Jun 4, 9:20 am, Yann Malet yann.ma...@gmail.com wrote:
If I send this request to 127.0.0.1:9000 without the file here it is
   the
string I can observe :


(ve)y...@yml-laptop:jess3$ netcat -l -p 9000
POST / HTTP/1.1
Accept-Encoding: identity
Content-Length: 377
X-Auth-Service-Provider:
  https://api.twitter.com/1/account/verify_credentials.json
Host: 127.0.0.1:9000
User-Agent: Python-urllib/2.6
Connection: close
Content-Type: multipart/form-data;
   boundary=a45bd25da2844dac81003987b3c19e18
X-Verify-Credentials-Authorization: OAuth realm=
  http://api.twitter.com/;,
oauth_signature_method=HMAC-SHA1,
oauth_consumer_key=y2hEqGNEmyjU2De3hNcg,
oauth_token=90476798-5VZeNLpXUCaJ06UaWve2c4JVfdcJj5D4r21JxUFM,
oauth_signature=NMPlU4cRYl0b6jbQJ1xGXaZ5%2FpM%3D

--a45bd25da2844dac81003987b3c19e18
Content-Disposition: form-data; name=key
Content-Type: text/plain; charset=utf-8
Content-Length: 32

4bb040d1ec65427f8038cdd60a12cde2
--a45bd25da2844dac81003987b3c19e18
Content-Disposition: form-data; name=message
Content-Type: text/plain; charset=utf-8
Content-Length: 13

copine et moi
--a45bd25da2844dac81003987b3c19e18--
^C
(ve)y...@yml-laptop:jess3$



Does any one can spot the issue ?
Regards,
--yml

On Fri, Jun 4, 2010 at 9:14 AM, Yann Malet yann.ma...@gmail.com
   wrote:
 Hello Zac,

 I rewrote everything in my app based on python-oauth2 :
http://dpaste.com/203168/
 The file is still hardcoded to ease the comprehension. I hope this
   will
 help you to spot my issue.

 The error message I get from twitpic is 400 bad request.
 Regards,
 --yml

 
 class OAuthEchoRequest(oauth.Request):
      def to_header(self, realm='http://api.twitter.com/'):
         headers = super(OAuthEchoRequest, 
 self).to_header(realm=realm)
         return {'X-Verify-Credentials-Authorization':
 headers['Authorization']}

 @login_required
 def twitpic_upload_photo(request):
     if request.method == 'POST':
         form = PhotoForm(request.POST, request.FILES)
         if form.is_valid():
             profile = Profile.objects.get(user=request.user)
             token = oauth.Token(profile.oauth_token,
                                profile.oauth_secret)

             params = {
                 'oauth_consumer_key': settings.TWITTER_CONSUMER_KEY,
                 'oauth_signature_method':HMAC-SHA1,
                 'oauth_token':token.key,
                  'oauth_timestamp':oauth.generate_timestamp(),
                 'oauth_nonce':oauth.generate_nonce(),
                 'oauth_version':'1.0'
             }

             oauth_echo_request = OAuthEchoRequest(method=GET,

  url=settings.TWITTER_VERIFY_CREDENTIALS,
                                           #parameters=params
                                           )

    signature=oauth_echo_request.sign_request(oauth.SignatureMethod_HMAC_SHA1()
   ,
 consumer,
                                     token)

             headers = oauth_echo_request.to_header()
             headers['X-Auth-Service-Provider'] =
 settings.TWITTER_VERIFY_CREDENTIALS

             #with multipart_encode
             values = [
                 

[twitter-dev] Re: New opt-in API features available today, May 26th: entities, retweets in timelines, custom oauth_callback schemes

2010-06-07 Thread Kilsally

does the updated retweet api fix the twitter widget code which also
did not post native retweets?


[twitter-dev] Authorization Question

2010-06-07 Thread Michael Cameron
I was reading a twitter app book, and mentioned something about when
you try to do a status update you have to always call authorize before
your request. is this true? I have pulled my tokens using a library.
but writing my own custom app.

Should i be sending /authorize with access tokens first before my
direct message request?


Re: [twitter-dev] Authorization Question

2010-06-07 Thread Taylor Singletary
Hi Michael,

The OAuth authorize step only needs to happen once before you receive access
tokens that allow you to act on a member's behalf. Once you've obtained an
access token, you can use it to make direct message requests for the user.
After completing the authorize and access token steps, store the access
token for the user so you can persist it across requests.

Taylor Singletary
Developer Advocate, Twitter
http://twitter.com/episod


On Mon, Jun 7, 2010 at 8:10 AM, Michael Cameron darx...@gmail.com wrote:

 I was reading a twitter app book, and mentioned something about when
 you try to do a status update you have to always call authorize before
 your request. is this true? I have pulled my tokens using a library.
 but writing my own custom app.

 Should i be sending /authorize with access tokens first before my
 direct message request?



[twitter-dev] Questions about Twitter API

2010-06-07 Thread lu5ceh
Hello ... had the intention to develop an application based on Twitter
search ...

1) It can increase the Twitter search limit assigned to 2 requests
per IP?

2) when i create a hashtag ... this is not automatically and instantly
reflected in the search .. what requirements must have a hashtag (of
time or amount) to be searchable?


[twitter-dev] Re: Search API: searching for Don and finding don't instead

2010-06-07 Thread Jeffrey Greenberg
Hello Twitter,
Anyone home?
j

On Jun 2, 11:28 pm, Jeffrey Greenberg jeffreygreenb...@gmail.com
wrote:
 We have a user that is causing us to create a search of the form:
    Don SomeLastName
 which is returning tweets containing don't and SomeLastName.

 Thats a no good!

 Is there a decent workaround for this by modifying the search? e.g.
     Don SomeLastName -don't
 but how do you escape the single quote?  Like this?
     Don SomeLastName -don't


[twitter-dev] In San Francisco for WWDC? Come to Twitter HQ on June 9th 6-8pm for a @twitterapi meetup!

2010-06-07 Thread Taylor Singletary
Hi Mac Devs,

This time last year we hosted an informal meetup of WWDC attendees. The
event turned into a fun evening so we've decided to do it again. We are
inviting WWDC attendees and Twitter Platform developers to our office on
Wednesday, June 9, at 6PM. There is limited space, so please register at
http://bit.ly/twitterapi-wwdc if you would like to join.

During the meetup, we plan to discuss xAuth, OAuth Echo, give an update on
annotations, see demos of iPhone, iPad, and Mac apps and hold an open QA.
If you would like to apply to demo your Mac-based app, please fill out this
form: http://bit.ly/asvBwI. Around 8 o'clock, we will all head out for a few
drinks to close out the evening. We hope to see you there.

Hope to see you there!

Thanks,

The @twitterapi Team


[twitter-dev] Re: Authorization Question

2010-06-07 Thread Michael Cameron
Thanks Taylor, One last question. i am trying to debug on why i can
not send messages with twitter, now i am trying to get any response
from twitter that works. and can not seem to get it to work. I am
trying cURL to get a response but i always get Could not authenticate
you. i am using 
http://www.jaanuskase.com/en/2010/01/understanding_the_guts_of_twit.html
website to figure out how, and the
http://hueniverse.com/2008/10/beginners-guide-to-oauth-part-iv-signing-requests/
to create my request examples, I want to ensure i have something
working to debug my javascript code.

so in essence i can not get this to work:
C:\curl -k -v -X POST -H 'Authorization: OAuth
realm=oauth_consumer_key=yJDLH7BDdVi1OKIINSV7Qoauth_token=142715285-
yi2ch324S3zfyKyJby6WDUZOhCsiQuKNUtc3nAGeoauth_nonce=1275928907blahoauth_timestamp=1275928907oauth_signature_method=HMAC-
SHA1oauth_version=1.0oauth_signature=Kf1epCD5j7nW
g9dLgtkT5OJXoQQ%3D,status=Hello' -d status=Hello
https://twitter.com/statuses/update.json

I recieve:
* Could not resolve host: OAuth; Host not found
* Closing connection #0
curl: (6) Could not resolve host: OAuth; Host not found
* Could not resolve host: realm=oauth_consumer_key=yJDLH7BDdVi1O
data record of requested type
* Closing connection #0
curl: (6) Could not resolve host: realm=oauth_consumer_key=yJDLH
* About to connect() to twitter.com port 443 (#0)
*   Trying 168.143.171.180... connected
* Connected to twitter.com (168.143.171.180) port 443 (#0)
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using AES256-SHA
* Server certificate:
*subject: 1.3.6.1.4.1.311.60.2.1.3=US; 1.3.6.1.4.1.311.6
*start date: 2010-05-11 00:00:00 GMT
*expire date: 2012-05-10 23:59:59 GMT
*common name: twitter.com (matched)
*issuer: C=US; O=VeriSign, Inc.; OU=VeriSign Trust Netwo
*SSL certificate verify result: unable to get local issu
 POST /statuses/update.json HTTP/1.1
 User-Agent: curl/7.20.1 (i386-pc-win32) libcurl/7.20.1 OpenSSL
 Host: twitter.com
 Accept: */*
 Content-Length: 12
 Content-Type: application/x-www-form-urlencoded

 HTTP/1.1 401 Unauthorized
 Date: Mon, 07 Jun 2010 16:57:58 GMT
 Server: hi
 Status: 401 Unauthorized
 WWW-Authenticate: Basic realm=Twitter API
 X-Runtime: 0.00208
 Content-Type: application/json; charset=utf-8
 Content-Length: 73
 Cache-Control: no-cache, max-age=300
 Set-Cookie: k=209.234.229.21.1275929878800654; path=/; expires
 Set-Cookie: guest_id=127592987880763413; path=/; expires=Wed,
 Set-Cookie: _twitter_sess=BAh7CDoPY3JlYXRlZF9hdGwrCBjhWBMpAToH
 Expires: Mon, 07 Jun 2010 17:02:58 GMT
 Vary: Accept-Encoding
 Connection: close


On Jun 7, 9:14 am, Taylor Singletary taylorsinglet...@twitter.com
wrote:
 Hi Michael,

 The OAuth authorize step only needs to happen once before you receive access
 tokens that allow you to act on a member's behalf. Once you've obtained an
 access token, you can use it to make direct message requests for the user.
 After completing the authorize and access token steps, store the access
 token for the user so you can persist it across requests.

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

 On Mon, Jun 7, 2010 at 8:10 AM, Michael Cameron darx...@gmail.com wrote:
  I was reading a twitter app book, and mentioned something about when
  you try to do a status update you have to always call authorize before
  your request. is this true? I have pulled my tokens using a library.
  but writing my own custom app.

  Should i be sending /authorize with access tokens first before my
  direct message request?


[twitter-dev] failed to validate oauth signature and token

2010-06-07 Thread EL
Hi,

Im trying to implement OAuth using JavaScript, but when I make my
request to http://api.twitter.com/oauth/request_token I am getting the
above message in the response (failed to validate oauth signature and
token).

As far as I can tell I'm including all the correct parametes, both in
the encoding of the signature base:


basestring: (consumer key removed for security)

POSThttp%3A%2F%2Ftwitter.com%2Foauth%2Frequest_token%26oauth_callback
%3Doob%26oauth_consumer_key
%3D112%26oauth_nonce
%3DO3cHsSXrfnzT%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp
%3D1275928008%26oauth_version%3D1.0

consumer secret: (removed for security)

112

Signature:

R3eHMuQ04F37+xPJSIsoo0aMzc8

Post Data: (consumer key removed for security)

oauth_callback=ooboauth_consumer_key=112oauth_signature_method=HMAC-
SHA1oauth_signature=pjDh8jkp89ThBtzz
+B9dQmxQfcgoauth_timestamp=1275928413oauth_nonce=qyq3Jhn8rtTZoauth_ve
+rsion=1.0


And I've checked that the clock is correct on my device as that's the
only real result I can find for this problem :( The nonce is unique
and generated every time it runs...
Unfortunately I don't know where to look now. I can't spot anything
obvious.

Any suggestions?

many thanks


Re: [twitter-dev] Questions about Twitter API

2010-06-07 Thread John Kalucki
Search has a ~20 second average indexing latency. It's not instant.


On Mon, Jun 7, 2010 at 9:05 AM, lu5ceh ignacio.santo...@gmail.com wrote:
 Hello ... had the intention to develop an application based on Twitter
 search ...

 1) It can increase the Twitter search limit assigned to 2 requests
 per IP?

 2) when i create a hashtag ... this is not automatically and instantly
 reflected in the search .. what requirements must have a hashtag (of
 time or amount) to be searchable?



[twitter-dev] Re: Search API: searching for Don and finding don't instead

2010-06-07 Thread themattharris
Hi Jeffrey,

Thanks for bumping this to our attention. Some of the threads fall off
our radar so a prompt is always welcome.

Search treats separate words as an AND search meaning a search for:
  Don SomeLastName
will translate to:
  Don AND SomeLastName.

For a complete phrase search you would instead want to search for:
  Don SomeLastName.

The problem you are experiencing with Don matching Don't is, as
you suggested, managed by appending -don't to the query. You don't
need to escape the apostrophe and the quotes are not necessary, making
your search query:
  Don SomeLastName -don't

You can read more about the supported advanced search operators on the
search site [1].

Hope that helps,

Matt Harris
Developer Advocate, Twitter
http://twitter.com/themattharris

1. http://search.twitter.com/operators

On Jun 7, 9:09 am, Jeffrey Greenberg jeffreygreenb...@gmail.com
wrote:
 Hello Twitter,
 Anyone home?
 j

 On Jun 2, 11:28 pm, Jeffrey Greenberg jeffreygreenb...@gmail.com
 wrote:



  We have a user that is causing us to create a search of the form:
     Don SomeLastName
  which is returning tweets containing don't and SomeLastName.

  Thats a no good!

  Is there a decent workaround for this by modifying the search? e.g.
      Don SomeLastName -don't
  but how do you escape the single quote?  Like this?
      Don SomeLastName -don't


[twitter-dev] Re: Search API: searching for Don and finding don't instead

2010-06-07 Thread Jeffrey Greenberg
Thanks Matt,

Unless they've been updated lately, the docs are not clear as to how
to handle contractions, so thanks for the -don't example.

Given that don't is regarded as a word, we believe that search
should _not_ return don't in a search for don... It's a bug in our
opinion.

Further, I'm not sure whether this is a problem only with contractions
(that is the handling of single-quote characters), or if search reacts
in weird/inconsistent/buggy ways when other special characters  (e.g.
single quotes, utf-8 stuff, etc) are used.  Can you check whether
there is consistent handling and spec for these from the search team?

Thanks,
Jeffrey
http://www.tweettronics.com

On Jun 7, 10:50 am, themattharris thematthar...@twitter.com wrote:
 Hi Jeffrey,

 Thanks for bumping this to our attention. Some of the threads fall off
 our radar so a prompt is always welcome.

 Search treats separate words as an AND search meaning a search for:
   Don SomeLastName
 will translate to:
   Don AND SomeLastName.

 For a complete phrase search you would instead want to search for:
   Don SomeLastName.

 The problem you are experiencing with Don matching Don't is, as
 you suggested, managed by appending -don't to the query. You don't
 need to escape the apostrophe and the quotes are not necessary, making
 your search query:
   Don SomeLastName -don't

 You can read more about the supported advanced search operators on the
 search site [1].

 Hope that helps,

 Matt Harris
 Developer Advocate, Twitterhttp://twitter.com/themattharris

 1.http://search.twitter.com/operators

 On Jun 7, 9:09 am, Jeffrey Greenberg jeffreygreenb...@gmail.com
 wrote:



  Hello Twitter,
  Anyone home?
  j

  On Jun 2, 11:28 pm, Jeffrey Greenberg jeffreygreenb...@gmail.com
  wrote:

   We have a user that is causing us to create a search of the form:
      Don SomeLastName
   which is returning tweets containing don't and SomeLastName.

   Thats a no good!

   Is there a decent workaround for this by modifying the search? e.g.
       Don SomeLastName -don't
   but how do you escape the single quote?  Like this?
       Don SomeLastName -don't


[twitter-dev] Re: Questions about Twitter API

2010-06-07 Thread lu5ceh
About the first answer

It can increase the TWITTER SEARCH limit assigned to 2 requests
per IP / hour ??


On 7 jun, 14:47, John Kalucki j...@twitter.com wrote:
 Search has a ~20 second average indexing latency. It's not instant.

 On Mon, Jun 7, 2010 at 9:05 AM, lu5ceh ignacio.santo...@gmail.com wrote:
  Hello ... had the intention to develop an application based on Twitter
  search ...

  1) It can increase the Twitter search limit assigned to 2 requests
  per IP?

  2) when i create a hashtag ... this is not automatically and instantly
  reflected in the search .. what requirements must have a hashtag (of
  time or amount) to be searchable?


Re: [twitter-dev] @anywhere fails if ShareThis on the page?

2010-06-07 Thread Todd Kloots
Hi @semel -

Still experiencing this problem with ShareThis and @Anywhere?  If so,
can you send an URL or some sample code so that we can figure out what
the problem is?  Thanks.

- Todd

On Fri, Jun 4, 2010 at 10:28 AM, LeeS - @semel lse...@gmail.com wrote:
 I get this Javascript error when trying to use @anywhere on the same
 page as a ShareThis widget.

 Error: Permission denied for [name of my site[ to get property
 Window.document from http://wd.sharethis.com.
 Source File: http://platform.twitter.com/anywhere.js?id=[my api
 key]v=1
 Line: 1



[twitter-dev] users/search query rate limit

2010-06-07 Thread Carrie
Hello,

I am using the users/search api -- http://api.twitter.com/1/users/search.xml?q=

the credentials i use has 20k hourly_limit.  but i am only able to do
1 query per minute maximum, ie. 60 queries per hour.  not sure if this
is the rate intended for users/search.



thanks,
Carrie


Re: [twitter-dev] users/search query rate limit

2010-06-07 Thread Abraham Williams
Check out the rate limited section:
http://apiwiki.twitter.com/Twitter-REST-API-Method:-users-search

Abraham
-
Abraham Williams | Developer for hire | http://abrah.am
@abraham | http://projects.abrah.am | http://blog.abrah.am
This email is: [ ] shareable [x] ask first [ ] private.


On Mon, Jun 7, 2010 at 12:21, Carrie xlendl...@gmail.com wrote:

 Hello,

 I am using the users/search api --
 http://api.twitter.com/1/users/search.xml?q=

 the credentials i use has 20k hourly_limit.  but i am only able to do
 1 query per minute maximum, ie. 60 queries per hour.  not sure if this
 is the rate intended for users/search.



 thanks,
 Carrie


[twitter-dev] Twitter 1500 search results

2010-06-07 Thread sahmed10
I am developing an application where i am trying to get more than 1500
results for a search query. Is it possible?
For example when i specify return all result from 2nd June to 6th June
with the search string of iphone i only get 1500 latest tweets, but
on the other hand i am interested in all the tweets which have metion
of iphone from 2nd June to 6th June.Is there a work around this?


Re: [twitter-dev] Twitter 1500 search results

2010-06-07 Thread Pascal Jürgens
As stated in the API WIKI, the number of search results you can get at any 
given point in time for one search term is indeed ~1500.
(http://apiwiki.twitter.com/Twitter-Search-API-Method:-search)

There are several ways to go beyond that.

a) Do perpetual searches (say, one every day), and merge the results
b) Get streaming access and track keywords in real time
c) Vary search terms and combine the results

Good luck.


On Jun 7, 2010, at 22:53 , sahmed10 wrote:

 I am developing an application where i am trying to get more than 1500
 results for a search query. Is it possible?
 For example when i specify return all result from 2nd June to 6th June
 with the search string of iphone i only get 1500 latest tweets, but
 on the other hand i am interested in all the tweets which have metion
 of iphone from 2nd June to 6th June.Is there a work around this?



[twitter-dev] Re: Incorrect Signature for oAuth

2010-06-07 Thread rhysmeister
Hi, thanks to you both. I've removed the source parameter.

There is something wrong with my signature base indeed. Here's what I
am sending for a status update...

POSThttp%3A%2F%2Fapi.twitter.com%2F1%2Fstatuses%2Fupdate.xml%3Fstatus
%3Dtest%26oauth_consumer_key%3Dxx%26oauth_nonce
%3DE9X6lVKiDkQ1n%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp
%3D1275946125%26oauth_token%3Dxx
%26oauth_version%3D1.0

As far as I can gather from this link 
http://dev.twitter.com/pages/auth#auth-request,
I need to remove query parameter from the url and order them in the
string. So in this case status would appear at the end. I can't find
it now, but some poster in a group said to put the status paramter in
the url rather than the post body.  I think I must have been ordering
the signature base incorrectly previous to this.

Rhys

On Jun 7, 3:09 pm, Taylor Singletary taylorsinglet...@twitter.com
wrote:
 To help you debug, it would be useful to see the signature base string that
 was generated for the request. Possible things going wrong: the signature
 base string isn't mentioning that this is a POST, or your OAuth-based
 parameters are leaking into your POST body..

 As Hwee-Boon said, you also needn't include the source parameter, as it will
 be ignored.

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



 On Sun, Jun 6, 2010 at 10:07 AM, Hwee-Boon Yar hweeb...@gmail.com wrote:
  Since it's GET works and POST, no. 1 reason is to make sure the base
  URI in the base signature string is constructed correctly. In your
  example, you don't need source= since it's OAuth.

  --
  Hwee-Boon

  On Jun 6, 8:56 pm, rhysmeister therhysmeis...@hotmail.com wrote:
   Hi All,

   I am having problems identifying what is wrong with converting my app
   to use oAuth. All my GET requests work fine but my POST requests all
   fail with an incorrect signature error. I am adding the oauth
   parameters to the authorisation header of my request. My authorisation
   header is build like below for GET requests (this works);

   OAuth

  oauth_timestamp=1234567890,oauth_nonce=xx,oauth_version=1.0,oauth
  _signature_method=HMAC-

  SHA1,oauth_consumer_key=xx,oauth_token=xx,oauth_signature=xxx
  xxx

   My POST requests (these don't work);

   OAuth

  oauth_timestamp=1234567890,oauth_nonce=xx,oauth_version=1.0,oauth
  _signature_method=HMAC-

  SHA1,oauth_consumer_key=xx,oauth_token=xx,oauth_signature=xxx
  xxx

   I get the below error returned...

   pre
   ?xml version=1.0 encoding=UTF-8?
   hash
     request/1/statuses/update.xml?source=xx/request
     errorIncorrect signature/error
   /hash

   Would anyone be able to provide any pointers here?

   Cheers,

   Rhys


[twitter-dev] Re: Twitter 1500 search results

2010-06-07 Thread sahmed10
I have been trying a certain algorithm but havent succeeded and
getting a http 403 response.
The algorithm is something like set a date say 2nd June to 4th June
with a string search query.

Call the search method and consume the first 1500 results , as the
tweets have status ids and you can limit the searches with the maxid
and sinceid parameter, get the sinceid from result and set it as the
maxid for the preceding 1500 tweets in time and so on.
Is this approach gonna work.



On Jun 7, 4:24 pm, Pascal Jürgens
lists.pascal.juerg...@googlemail.com wrote:
 As stated in the API WIKI, the number of search results you can get at any 
 given point in time for one search term is indeed ~1500.
 (http://apiwiki.twitter.com/Twitter-Search-API-Method:-search)

 There are several ways to go beyond that.

 a) Do perpetual searches (say, one every day), and merge the results
 b) Get streaming access and track keywords in real time
 c) Vary search terms and combine the results

 Good luck.

 On Jun 7, 2010, at 22:53 , sahmed10 wrote:

  I am developing an application where i am trying to get more than 1500
  results for a search query. Is it possible?
  For example when i specify return all result from 2nd June to 6th June
  with the search string of iphone i only get 1500 latest tweets, but
  on the other hand i am interested in all the tweets which have metion
  of iphone from 2nd June to 6th June.Is there a work around this?


[twitter-dev] Re: Twitter 1500 search results

2010-06-07 Thread sahmed10
yes it works! This algorithm works
Its something like this
Set the query to a string with appropriate To and From dates. Then
consuem the 1500 streaming results and also save the status id of the
very last tweet you got. As they are in order sequentially(with gaps)
it wont be a problem. The very last tweet status id should be assigned
as the MaxId for the next set of results and so on.


On Jun 7, 4:44 pm, sahmed10 sahme...@luc.edu wrote:
 I have been trying a certain algorithm but havent succeeded and
 getting a http 403 response.
 The algorithm is something like set a date say 2nd June to 4th June
 with a string search query.

 Call the search method and consume the first 1500 results , as the
 tweets have status ids and you can limit the searches with the maxid
 and sinceid parameter, get the sinceid from result and set it as the
 maxid for the preceding 1500 tweets in time and so on.
 Is this approach gonna work.

 On Jun 7, 4:24 pm, Pascal Jürgens

 lists.pascal.juerg...@googlemail.com wrote:
  As stated in the API WIKI, the number of search results you can get at any 
  given point in time for one search term is indeed ~1500.
  (http://apiwiki.twitter.com/Twitter-Search-API-Method:-search)

  There are several ways to go beyond that.

  a) Do perpetual searches (say, one every day), and merge the results
  b) Get streaming access and track keywords in real time
  c) Vary search terms and combine the results

  Good luck.

  On Jun 7, 2010, at 22:53 , sahmed10 wrote:

   I am developing an application where i am trying to get more than 1500
   results for a search query. Is it possible?
   For example when i specify return all result from 2nd June to 6th June
   with the search string of iphone i only get 1500 latest tweets, but
   on the other hand i am interested in all the tweets which have metion
   of iphone from 2nd June to 6th June.Is there a work around this?


Re: [twitter-dev] Re: Twitter 1500 search results

2010-06-07 Thread Pascal Jürgens
Good to know. Did you mean to say consume … streaming results? I don't really 
see where you use the stream here.

Also, please note that it's not a good idea to work with since_id and 
max_id any more, because those will soon be (already are?) NON-SEQUENTIAL. 
This means you will lose tweets if you rely on the IDs incrementing over time. 
To quote the relevant email from Taylor Singletary:

 Please don't depend on the exact format of the ID. As our infrastructure 
 needs evolve, we might need to tweak the generation algorithm again.
 
 If you've been trying to divine meaning from status IDs aside from their role 
 as a primary key, you won't be able to anymore. Likewise for usage of IDs in 
 mathematical operations -- for instance, subtracting two status IDs to 
 determine the number of tweets in between will no longer be possible

Cheers.

On Jun 8, 2010, at 0:06 , sahmed10 wrote:

 yes it works! This algorithm works
 Its something like this
 Set the query to a string with appropriate To and From dates. Then
 consuem the 1500 streaming results and also save the status id of the
 very last tweet you got. As they are in order sequentially(with gaps)
 it wont be a problem. The very last tweet status id should be assigned
 as the MaxId for the next set of results and so on.



Re: [twitter-dev] Identifying HTTP Auth sites

2010-06-07 Thread Abraham Williams
For accounts that POST new statuses this is pretty easy as you can just look
at the user_timeline and check the source field for from API.

Abraham
-
Abraham Williams | Developer for hire | http://abrah.am
@abraham | http://projects.abrah.am | http://blog.abrah.am
This email is: [ ] shareable [x] ask first [ ] private.


On Wed, Jun 2, 2010 at 05:49, Tim Nash gurgithebr...@googlemail.com wrote:

 Just thinking about the 30h of June, is there anyway to pull the last
 x number of API requests and see if they were authenticated from Oauth/
 basic.

 I have a fairly large number of projects some I know are using Oauth
 some are not, but all have 1 or 2 test accounts in common so if I
 could look at the last api calls to that account I can see which were
 using old style authentication and which is using new.

 It would be a handy feature for those trying to find those 2/3 year
 old app still occasionally posting.


[twitter-dev] Re: Incorrect Signature for oAuth

2010-06-07 Thread StephenBnz
Hi Rhys,
- you're right status should be at the end of the base string. Even
though it's sent as a POST, it still has to go in alpha order in the
base string.
- Also be careful of the leading %3F you've got after the update.xml -
should just be (method)(baseURL+service)(list of params separated by
%26)
- Once you've signed with this string, your message will look like:
(pseudo code not actual message)

POST HTTP 1.1 /statuses/update.xml
Host: api.twitter.com:443
Authorization: (list of params as normal, including oauth_signature
but NOT including status)
Content-type: application/x-www-form-urlencoded
Body:
status=test

Also note that if you have non-alpha characters in the status string
(eg. space, etc) you must URL encode them BEFORE compiling the base
signature string, and also ensure they remain URL encoded in the POST
body.

Hope this helps
Stephen

On Jun 8, 7:36 am, rhysmeister therhysmeis...@hotmail.com wrote:
 Hi, thanks to you both. I've removed the source parameter.

 There is something wrong with my signature base indeed. Here's what I
 am sending for a status update...

 POSThttp%3A%2F%2Fapi.twitter.com%2F1%2Fstatuses%2Fupdate.xml%3Fstatus
 %3Dtest%26oauth_consumer_key%3Dxx%26oauth_nonce
 %3DE9X6lVKiDkQ1n%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp
 %3D1275946125%26oauth_token%3Dxx
 %26oauth_version%3D1.0

 As far as I can gather from this 
 linkhttp://dev.twitter.com/pages/auth#auth-request,
 I need to remove query parameter from the url and order them in the
 string. So in this case status would appear at the end. I can't find
 it now, but some poster in a group said to put the status paramter in
 the url rather than the post body.  I think I must have been ordering
 the signature base incorrectly previous to this.

 Rhys

 On Jun 7, 3:09 pm, Taylor Singletary taylorsinglet...@twitter.com
 wrote:

  To help you debug, it would be useful to see the signature base string that
  was generated for the request. Possible things going wrong: the signature
  base string isn't mentioning that this is a POST, or your OAuth-based
  parameters are leaking into your POST body..

  As Hwee-Boon said, you also needn't include the source parameter, as it will
  be ignored.

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

  On Sun, Jun 6, 2010 at 10:07 AM, Hwee-Boon Yar hweeb...@gmail.com wrote:
   Since it's GET works and POST, no. 1 reason is to make sure the base
   URI in the base signature string is constructed correctly. In your
   example, you don't need source= since it's OAuth.

   --
   Hwee-Boon

   On Jun 6, 8:56 pm, rhysmeister therhysmeis...@hotmail.com wrote:
Hi All,

I am having problems identifying what is wrong with converting my app
to use oAuth. All my GET requests work fine but my POST requests all
fail with an incorrect signature error. I am adding the oauth
parameters to the authorisation header of my request. My authorisation
header is build like below for GET requests (this works);

OAuth

   oauth_timestamp=1234567890,oauth_nonce=xx,oauth_version=1.0,oauth
   _signature_method=HMAC-

   SHA1,oauth_consumer_key=xx,oauth_token=xx,oauth_signature=xxx
   xxx

My POST requests (these don't work);

OAuth

   oauth_timestamp=1234567890,oauth_nonce=xx,oauth_version=1.0,oauth
   _signature_method=HMAC-

   SHA1,oauth_consumer_key=xx,oauth_token=xx,oauth_signature=xxx
   xxx

I get the below error returned...

pre
?xml version=1.0 encoding=UTF-8?
hash
  request/1/statuses/update.xml?source=xx/request
  errorIncorrect signature/error
/hash

Would anyone be able to provide any pointers here?

Cheers,

Rhys


[twitter-dev] We need some help please

2010-06-07 Thread SlideInCode
We need some help please...

We have a new service that is launching in just a few weeks (June
22nd). We have been developing this script since March 2009, and now
with the new oAuth integration we are concerned as to whether we can
still integrate twitter into our service for our members.

Our entire web site, sales video and training material focuses on the
twitter integration we performed, so a solution is our only option, as
we do not have the time to edit the promotional videos, website and
content.

Here is an example of how the existing integration has taken place:

http://bit.ly/dt2LRm

The user would simply input their username and password to tweet the
clients message and follow them. Upon completion, a thank you message
is displayed within the SlideIn. The point of our script is to create
an unobtrusive and simple experience that users can enjoy the
simplicity of. There is no redirection or new pages to
view...everything happens within the slidein, and the users do not
lose focus of the initial website they are browsing.

We are excited to offer real-time validation to our clients so they
are assured valid tweets and followers. However, we require assistance
and hope that we can still intergrate twitter in the same or similar
manner, without visitors having to leave the website.

Please do advise if you can help - willing to pay for solution.

Thank you.
SlideInCode


Re: [twitter-dev] Re: Annotations with data types

2010-06-07 Thread Harshad RJ
On Sun, Jun 6, 2010 at 12:36 AM, Mark Plotnick mark.plotn...@gmail.comwrote:

 I'm not sure we ought to devote bytes in the rather limited length
 annotations for data type names. Maybe have an optional (URL to a)
 schema that describes what the restrictions are.


If the schema specified in the annotation is enforced by Twitter, yeah, that
would be a great idea too. Though, for Twitter, there's the added
complexity/bandwidth of fetching a schema for every tweet, since I think the
number of schemas would be so huge that you can't just cache them all
easily.

But I am more concerned that nobody's seeing/acknowledging the magnitude of
the problem. Even if the currently mentioned solutions are not ideal,
including mine, I think something needs to be done to search for a solution.

Or perhaps I am just over-reacting.

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


Re: [twitter-dev] Re: Twitter 1500 search results

2010-06-07 Thread John Kalucki
Pascal,

These assumptions about since_id and max_id are incorrect. You can
still, and must still, rely upon them for fetching. The additional
jitter introduced by the id generation scheme is statistically
insignificant and very small compared to other reordering effects in
the Twitter system. Tweets are K-ordered over a multiple second window
as they are today, whereas the additional K introduced by the ID
generation system will be sub-second, if not sub-millisecond, and
practically irrelevant.

If you are doing repeated automated queries against the Search API,
you should transition to streaming. If you are attempting to get every
tweet that matches, which is clearly the case given the questions
below, transitioning to streaming is your only option, as search is
already filtering for relevance and this filtering will only increase
over time.

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






2010/6/7 Pascal Jürgens lists.pascal.juerg...@googlemail.com:
 Good to know. Did you mean to say consume … streaming results? I don't 
 really see where you use the stream here.

 Also, please note that it's not a good idea to work with since_id and 
 max_id any more, because those will soon be (already are?) NON-SEQUENTIAL. 
 This means you will lose tweets if you rely on the IDs incrementing over 
 time. To quote the relevant email from Taylor Singletary:

 Please don't depend on the exact format of the ID. As our infrastructure 
 needs evolve, we might need to tweak the generation algorithm again.

 If you've been trying to divine meaning from status IDs aside from their 
 role as a primary key, you won't be able to anymore. Likewise for usage of 
 IDs in mathematical operations -- for instance, subtracting two status IDs 
 to determine the number of tweets in between will no longer be possible

 Cheers.

 On Jun 8, 2010, at 0:06 , sahmed10 wrote:

 yes it works! This algorithm works
 Its something like this
 Set the query to a string with appropriate To and From dates. Then
 consuem the 1500 streaming results and also save the status id of the
 very last tweet you got. As they are in order sequentially(with gaps)
 it wont be a problem. The very last tweet status id should be assigned
 as the MaxId for the next set of results and so on.




Re: [twitter-dev] Re: Questions about Twitter API

2010-06-07 Thread John Kalucki
You can request higher rate limits at a...@twitter.com, but if you are
doing 5qps, perhaps you'd be better off moving over to streaming?

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



On Mon, Jun 7, 2010 at 11:46 AM, lu5ceh ignacio.santo...@gmail.com wrote:
 About the first answer

 It can increase the TWITTER SEARCH limit assigned to 2 requests
 per IP / hour ??


 On 7 jun, 14:47, John Kalucki j...@twitter.com wrote:
 Search has a ~20 second average indexing latency. It's not instant.

 On Mon, Jun 7, 2010 at 9:05 AM, lu5ceh ignacio.santo...@gmail.com wrote:
  Hello ... had the intention to develop an application based on Twitter
  search ...

  1) It can increase the Twitter search limit assigned to 2 requests
  per IP?

  2) when i create a hashtag ... this is not automatically and instantly
  reflected in the search .. what requirements must have a hashtag (of
  time or amount) to be searchable?