[twitter-dev] problem with http://twitter.com/statuses/update.xml

2009-04-20 Thread Adrian

I have a php script that posts updates to http://twitter.com/statuses/update.xml

It works reliably when posting to one account of mine, but when
switching to another, it constantly says Problem with Twitter. Could
not authenticate you. Try again later.

I try again later, multiple times, and only sometimes it will actually
work. With the other account it always works, so there's something up
with Twitter and some accounts for such updating.


[twitter-dev] Re: problem with http://twitter.com/statuses/update.xml

2009-04-20 Thread Adrian

Also, for the account that works, if I changes its screen name to the
account that doesn't work well, that working account stops working
properly.

On Apr 20, 10:12 am, Adrian spiritpo...@gmail.com wrote:
 I have a php script that posts updates 
 tohttp://twitter.com/statuses/update.xml

 It works reliably when posting to one account of mine, but when
 switching to another, it constantly says Problem with Twitter. Could
 not authenticate you. Try again later.

 I try again later, multiple times, and only sometimes it will actually
 work. With the other account it always works, so there's something up
 with Twitter and some accounts for such updating.


[twitter-dev] Re: problem with http://twitter.com/statuses/update.xml

2009-04-20 Thread Abraham Williams
It would be helpful if you provided code and more details.

On Mon, Apr 20, 2009 at 02:14, Adrian spiritpo...@gmail.com wrote:


 Also, for the account that works, if I changes its screen name to the
 account that doesn't work well, that working account stops working
 properly.

 On Apr 20, 10:12 am, Adrian spiritpo...@gmail.com wrote:
  I have a php script that posts updates tohttp://
 twitter.com/statuses/update.xml
 
  It works reliably when posting to one account of mine, but when
  switching to another, it constantly says Problem with Twitter. Could
  not authenticate you. Try again later.
 
  I try again later, multiple times, and only sometimes it will actually
  work. With the other account it always works, so there's something up
  with Twitter and some accounts for such updating.




-- 
Abraham Williams | http://the.hackerconundrum.com
Hacker | http://abrah.am | http://twitter.com/abraham
Web608 | Community Evangelist | http://web608.org
This email is: [ ] blogable [x] ask first [ ] private.


[twitter-dev] Re: problem with http://twitter.com/statuses/update.xml

2009-04-20 Thread Adrian

PHP code used:

Hence the error message given is could not authenticate -$response

while( $message = array_pop($messages) ){
$ch = curl_init('http://twitter.com/statuses/update.xml');
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'status='.urlencode($message));
curl_setopt($ch, CURLOPT_USERPWD, $settings['twitter-username'].':'.
$settings['twitter-password']);
$response = curl_exec($ch);
$resp = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo  'brposted '.urlencode($message).'br';
if ( $resp != '200' )
die('Problem with twitter. We should try later. Twitter 
reported: '.
$response);
else
sleep(5);//Sleep 5 seconds before the next update
}



On Apr 20, 11:48 am, Abraham Williams 4bra...@gmail.com wrote:
 It would be helpful if you provided code and more details.



 On Mon, Apr 20, 2009 at 02:14, Adrian spiritpo...@gmail.com wrote:

  Also, for the account that works, if I changes its screen name to the
  account that doesn't work well, that working account stops working
  properly.

  On Apr 20, 10:12 am, Adrian spiritpo...@gmail.com wrote:
   I have a php script that posts updates tohttp://
  twitter.com/statuses/update.xml

   It works reliably when posting to one account of mine, but when
   switching to another, it constantly says Problem with Twitter. Could
   not authenticate you. Try again later.

   I try again later, multiple times, and only sometimes it will actually
   work. With the other account it always works, so there's something up
   with Twitter and some accounts for such updating.

 --
 Abraham Williams |http://the.hackerconundrum.com
 Hacker |http://abrah.am|http://twitter.com/abraham
 Web608 | Community Evangelist |http://web608.org
 This email is: [ ] blogable [x] ask first [ ] private.


[twitter-dev] Re: Sign in with Twitter

2009-04-20 Thread Jesse Stay
Was there an announcement that this was going down? I'm seeing This feature
is temporarily disabled as well.
Jesse

On Sun, Apr 19, 2009 at 4:05 AM, Rore rotem.her...@gmail.com wrote:


 Any idea when authenticate url will work again?


 On Apr 17, 4:31 pm, Matt Sanford m...@twitter.com wrote:
  Hi all,
 
   This behavior (i.e. which token is returned) is likely to change
  soon. Once again, stay tuned for updates.
 
  — Matt
 
  On Apr 17, 2009, at 01:02 AM, Abraham Williams wrote:
 
   The oauth_token returned from oauth/authenticate is the key from the
   users access tokens. as long as you store the access tokens you can
   match the returned oauth_token with what is in your database.
 
   On Fri, Apr 17, 2009 at 01:35, John Kristian jmkrist...@gmail.com
   wrote:
 
   I'm having trouble using /oauth/authenticate, too.  After
   authenticating, Twitter redirects back to my consumer with a different
   oauth_token than the one I sent to initiate authentication.  Twitter
   APIs don't accept either token.  Sending the original request token
   to /oauth/access_token elicits HTTP 401 with an XML error Invalid /
   expired Token.  Sending the second callback token elicits HTTP 500
   Internal Server Error with an HTML body entitled Twitter / Error.
   When either token is used as an access token, Twitter responds with
   401.  The original request token elicits an XML error Invalid /
   expired Token; the second token elicits Failed to validate oauth
   signature or token.
 
   For signing I used the token secret associated with the original
   request token.  The user has already given permission to this
   consumer.
 
   Help?
 
   On Apr 16, 12:25 pm, Dossy Shiobara do...@panoptic.com wrote:
I just tried out the oauth/authenticate - I supplied a
   RequestToken and
it redirected back to my callback URL with an AccessToken ... but,
what's the token secret for this AccessToken?  I only know the
   secret
for the RequestToken I sent it ... Is the token secret the same
   for the
AccessToken I get back?
 
   --
   Abraham Williams |http://the.hackerconundrum.com
   Hacker |http://abrah.am|http://twitter.com/abraham
   Web608 | Community Evangelist |http://web608.org
   This email is: [ ] blogable [x] ask first [ ] private.
   Sent from Madison, Wisconsin, United States



[twitter-dev] export followers

2009-04-20 Thread guido

I want to export my followers, including the number of their
followers. I have found lots of tools to export name, nickname etc.
but none that seems to export the follower-number. Can anyone help?

Thanks
Gudio


[twitter-dev] Re: Posting a status update to the Mobile version of Twitter

2009-04-20 Thread James Abley

Just to confirm my understanding, is clickjacking not an issue when
using http://twitter.com/ but it potentially is when using http://m.twitter.com/
?

Can you suggest what the preferred way to provide this type of easy-
linking functionality might be for mobile?

Cheers,

James

On Mar 3, 11:15 pm, Alex Payne a...@twitter.com wrote:
 In order to prevent clickjacking attacks, we had to disable this 
 functionality.



 On Tue, Mar 3, 2009 at 13:44, aschobel ascho...@gmail.com wrote:

  To clarify, we only want to prepopulate the status field.

  This works on the standard version, doesn't work on the mobile
  version.

  It used to work on mobile version according to this thread:

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

  Cheers,
  Andreas

  Follow us on Twitter @3banana
 http://twitter.com/3banana

  On Mar 3, 1:00 pm, aschobel ascho...@gmail.com wrote:
  We are having problems posting status updates to the mobile version of
  Twitter, it looks like the status input field for the mobile version
  comes with a default value of .

  input type=text name=status id=status maxlength=140 class=i
  value=/

  For the standard version of Twitter, we can pre-populate the status
  field by doing opening the following page:

 http://twitter.com/home?status=Hello%20world

  Our app for Android lets folks share their notes to Twitter, and this
  was working fine until Twitter started detecting the user agent for
  Android and giving people the mobile version instead of the standard
  version.

  Is there a way to force the Standard version? Passing in ui_type=s
  doesn't do anything.

  We support Twidroid, but not everybody has that installed.

  Cheers,
  Andreas

  Follow us on Twitter @3bananahttp://twitter.com/3banana

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


[twitter-dev] Re: TimeLine of 3~4 users

2009-04-20 Thread Raquibul Islam

Hello peter
thanks for ur replay . U got me right .Thanks for the advice .


Peter Denton wrote:
 Hi Raquibul,
 I know what you are asking and it is not possible. Basically, if I may 
 guess, you want to make a group of 3 people you follow and be able 
 to make a call to their stream collated. You can not do this with an 
 API method, however there are plenty of tools like magpie rss that can 
 grab 3 feeds and parse them into one feed, to achieve what you are 
 looking for.

 On Sun, Apr 19, 2009 at 9:40 PM, Raquibul Islam ranacs...@gmail.com 
 mailto:ranacs...@gmail.com wrote:


 i saw this before . How can i call with 3 users name together ?


 Abraham Williams wrote:
  Use
 
 
 http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-statuses-user_timeline
  for the 3 or 4 users.
 
  On Sun, Apr 19, 2009 at 16:06, ranacse05 ranacs...@gmail.com
 mailto:ranacs...@gmail.com
  mailto:ranacs...@gmail.com mailto:ranacs...@gmail.com wrote:
 
 
  Hello
  suppose i'm following 100 users , how can i get the twittes
 only from
  3 or 4 users ???
 
  I meant using the api , so that the page will show the
 selected users
  status only .
 
 
 
 
  --
  Abraham Williams | http://the.hackerconundrum.com
  Hacker | http://abrah.am | http://twitter.com/abraham
  Web608 | Community Evangelist | http://web608.org
  This email is: [ ] blogable [x] ask first [ ] private.
  Sent from Madison, Wisconsin, United States


 --
 Regards

 Rana
 homepage: http://ranacse05.wordpress.com
 Bangla job site: http://jobs.mukto.org




 -- 
 Peter M. Denton
 www.twibs.com http://www.twibs.com
 i...@twibs.com mailto:i...@twibs.com

 Twibs makes Top 20 apps on Twitter - http://tinyurl.com/bopu6c




-- 
Regards

Rana
homepage: http://ranacse05.wordpress.com
Bangla job site: http://jobs.mukto.org



[twitter-dev] Re: Are the Search servers down?

2009-04-20 Thread Matt Sanford


Hi Chad,

There was some trouble last night that stopped updates coming  
into the search system. They were corrected but it took some time to  
find the root cause and correct it. Search should be fine at this point.


Thanks;
  — Matt

On Apr 19, 2009, at 09:36 PM, Chad Etzel wrote:



I'm noticing the Search indexes haven't updated in about 2 hours (as
of now).  Are they dead, mon?

-Chad




[twitter-dev] Re: Rate limit status's remaining_hits element scope

2009-04-20 Thread obeymiffy

On a related note, i'm finding that these params
* X-RateLimit-Limit
* X-RateLimit-Remaining
* X-RateLimit-Reset
only seem to get returned to me when i call the account/
rate_limit_status endpoint.  And even though the docs say that it
should not count against the API limit, they are the only call that
shows that count being decremented.

I've double checked that my calls are GET and i'm using the
search.json endpoint with very simple queries.  Am I missing
something?  I'd like to track that number so that I know if our usage
is going to be near the rate limit.

Regards
Jon


On Apr 17, 11:14 am, Doug Williams d...@twitter.com wrote:
 It is the number of hits you have left until the reset-time is hit. So it's
 part of that rolling window.

 ?xml version=1.0 encoding=UTF-8?

 hash

 remaining-hits type=integer19933/remaining-hits

 hourly-limit type=integer2/hourly-limit

 reset-time type=datetime2009-04-08T21:57:23+00:00/reset-time

 reset-time-in-seconds type=integer1239227843/reset-time-in-seconds

 /hash

 Doug Williams
 Twitter API Supporthttp://twitter.com/dougw

 On Fri, Apr 17, 2009 at 6:27 AM, Dimebrain daniel.cre...@gmail.com wrote:

  I just realized I don't know whether the remaining_hits element
  returned for /account/rate_limit_status is a static number from the
  beginning of the current hour, or if it is the remaining hits on a
  rolling sixty minute cycle. Does anyone know?


[twitter-dev] Re: [oAuth] Signature with GET Parameters

2009-04-20 Thread Matt Sanford

Hi there,

Dossy is referring to the fact you need to sort the parameters  
alphabetically for the signature method [1].


— Matt

[1] - http://oauth.net/core/1.0/#rfc.section.9.1.1


On Apr 20, 2009, at 09:27 AM, Dossy Shiobara wrote:



On 4/20/09 11:16 AM, max wrote:

This is the base signature string:
GEThttp%3A%2F%2Ftwitter.com%2Fstatuses
%2Freplies.jsonoauth_consumer_key%3DwHwEqxY9SGIzQfxUvsNkDw
%26oauth_nonce%3D5548448e3b10dad18c3b38d8f7a9a9fa
%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp
%3D1240240406%26oauth_token%3D14733270-
Zers1INc93ugsxwtaTYow6tDqI9uYyPbsBEVyCGhw%26oauth_version 
%3D1.0%26count

%3D2


c comes before o, not after.


--
Dossy Shiobara  | do...@panoptic.com | http://dossy.org/
Panoptic Computer Network   | http://panoptic.com/
 He realized the fastest way to change is to laugh at your own
   folly -- then you can let go and quickly move on. (p. 70)




[twitter-dev] Re: Rate limit status's remaining_hits element scope

2009-04-20 Thread Matt Sanford

Hi Jon,

The search and main twitter.com APIs use different rate limiting  
[1] so search.json is not expected to have those headers.


Thanks;
  — Matt Sanford / @mzsanford

[1] - http://apiwiki.twitter.com/Rate-limiting

On Apr 20, 2009, at 09:14 AM, obeymiffy wrote:



On a related note, i'm finding that these params
   * X-RateLimit-Limit
   * X-RateLimit-Remaining
   * X-RateLimit-Reset
only seem to get returned to me when i call the account/
rate_limit_status endpoint.  And even though the docs say that it
should not count against the API limit, they are the only call that
shows that count being decremented.

I've double checked that my calls are GET and i'm using the
search.json endpoint with very simple queries.  Am I missing
something?  I'd like to track that number so that I know if our usage
is going to be near the rate limit.

Regards
Jon


On Apr 17, 11:14 am, Doug Williams d...@twitter.com wrote:
It is the number of hits you have left until the reset-time is hit.  
So it's

part of that rolling window.

?xml version=1.0 encoding=UTF-8?

hash

remaining-hits type=integer19933/remaining-hits

hourly-limit type=integer2/hourly-limit

reset-time type=datetime2009-04-08T21:57:23+00:00/reset-time

reset-time-in-seconds type=integer1239227843/reset-time-in- 
seconds


/hash

Doug Williams
Twitter API Supporthttp://twitter.com/dougw

On Fri, Apr 17, 2009 at 6:27 AM, Dimebrain  
daniel.cre...@gmail.com wrote:



I just realized I don't know whether the remaining_hits element
returned for /account/rate_limit_status is a static number from the
beginning of the current hour, or if it is the remaining hits on a
rolling sixty minute cycle. Does anyone know?




[twitter-dev] Re: [oAuth] Signature with GET Parameters

2009-04-20 Thread Guan Yang

On Mon, Apr 20, 2009 at 11:16, max maxnet...@gmail.com wrote:
 All is working well with oAuth, normal GET requests, POST request with
 or without data. However GET requests with parameters do not work.
 (php, self written). I keep getting a Failed to validate oauth
 signature or token.

 This is the base signature string:
 GEThttp%3A%2F%2Ftwitter.com%2Fstatuses
 %2Freplies.jsonoauth_consumer_key%3DwHwEqxY9SGIzQfxUvsNkDw
 %26oauth_nonce%3D5548448e3b10dad18c3b38d8f7a9a9fa
 %26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp
 %3D1240240406%26oauth_token%3D14733270-
 Zers1INc93ugsxwtaTYow6tDqI9uYyPbsBEVyCGhw%26oauth_version%3D1.0%26count
 %3D2

How are you generating the signature base string?

The parameters are supposed to be sorted by key, so count=2 should be
at the beginning, before oauth_consumer_key.

But that doesn't explain why your POSTs are okay.

Guan


[twitter-dev] API returning 0 and false for Boolean XML elements

2009-04-20 Thread Dimebrain

I'm calling /direct_messages.xml and getting back this:

direct-messages type=array
-
direct_message
id98485094/id
sender_id780830/sender_id
-
text
Top secret DM of incalculable value.
/text
recipient_id11173402/recipient_id
created_atMon Apr 20 17:14:39 + 2009/created_at
sender_screen_nameBPAndrew/sender_screen_name
recipient_screen_namedimebrain/recipient_screen_name
-
sender
id780830/id
nameAndrew M/name
screen_nameBPAndrew/screen_name
locationOttawa/location
-
description
First Sea Lord Admiral Sir BPAndrew McHugeWangington III
/description
-
profile_image_url
http://s3.amazonaws.com/twitter_production/profile_images/145551479/DSC03176_normal_normal.JPG
/profile_image_url
url/
protectedfalse/protected
followers_count171/followers_count
profile_background_color1A1B1F/profile_background_color
profile_text_color66/profile_text_color
profile_link_color2FC2EF/profile_link_color
profile_sidebar_fill_color252429/profile_sidebar_fill_color
profile_sidebar_border_color181A1E/profile_sidebar_border_color
friends_count40/friends_count
created_atMon Feb 19 19:15:39 + 2007/created_at
favourites_count99/favourites_count
utc_offset-18000/utc_offset
time_zoneEastern Time (US  Canada)/time_zone
-
profile_background_image_url
http://static.twitter.com/images/themes/theme9/bg.gif
/profile_background_image_url
profile_background_tilefalse/profile_background_tile
statuses_count6221/statuses_count
notificationsfalse/notifications
followingfalse/following
/sender
-
recipient
id11173402/id
nameDaniel Crenna/name
screen_namedimebrain/screen_name
locationOttawa (soon)/location
-
description
Daniel Crenna builds social software. Writing a book on Twitter
development, and creating TweetSharp with @jdiller.
/description
-
profile_image_url
http://s3.amazonaws.com/twitter_production/profile_images/87135858/0065_540_normal.png
/profile_image_url
urlhttp://www.dimebrain.com/url
protectedfalse/protected
followers_count378/followers_count
profile_background_color050f10/profile_background_color
profile_text_color33/profile_text_color
profile_link_color0084B4/profile_link_color
profile_sidebar_fill_colore0e0e0/profile_sidebar_fill_color
profile_sidebar_border_color00/profile_sidebar_border_color
friends_count290/friends_count
created_atFri Dec 14 18:48:52 + 2007/created_at
favourites_count63/favourites_count
utc_offset-14400/utc_offset
time_zoneAtlantic Time (Canada)/time_zone
-
profile_background_image_url
http://s3.amazonaws.com/twitter_production/profile_background_images/3243957/Social_Background.png
/profile_background_image_url
profile_background_tilefalse/profile_background_tile
statuses_count894/statuses_count
notifications0/notifications
following0/following
/recipient
/direct_message
/direct-messages

The part of interest is the fact that the sender's notifications/
following elements are populated with false while the recipient's
values for the same are 0's -- smells like a bug, but wanted to check
here first.


[twitter-dev] Re: API returning 0 and false for Boolean XML elements

2009-04-20 Thread Doug Williams
Please see 419 [1] and 474 [2].

1. http://code.google.com/p/twitter-api/issues/detail?id=419
2. http://code.google.com/p/twitter-api/issues/detail?id=474

Doug Williams
Twitter API Support
http://twitter.com/dougw


On Mon, Apr 20, 2009 at 10:42 AM, Dimebrain daniel.cre...@gmail.com wrote:


 I'm calling /direct_messages.xml and getting back this:

 direct-messages type=array
 -
 direct_message
 id98485094/id
 sender_id780830/sender_id
 -
 text
 Top secret DM of incalculable value.
 /text
 recipient_id11173402/recipient_id
 created_atMon Apr 20 17:14:39 + 2009/created_at
 sender_screen_nameBPAndrew/sender_screen_name
 recipient_screen_namedimebrain/recipient_screen_name
 -
 sender
 id780830/id
 nameAndrew M/name
 screen_nameBPAndrew/screen_name
 locationOttawa/location
 -
 description
 First Sea Lord Admiral Sir BPAndrew McHugeWangington III
 /description
 -
 profile_image_url

 http://s3.amazonaws.com/twitter_production/profile_images/145551479/DSC03176_normal_normal.JPG
 /profile_image_url
 url/
 protectedfalse/protected
 followers_count171/followers_count
 profile_background_color1A1B1F/profile_background_color
 profile_text_color66/profile_text_color
 profile_link_color2FC2EF/profile_link_color
 profile_sidebar_fill_color252429/profile_sidebar_fill_color
 profile_sidebar_border_color181A1E/profile_sidebar_border_color
 friends_count40/friends_count
 created_atMon Feb 19 19:15:39 + 2007/created_at
 favourites_count99/favourites_count
 utc_offset-18000/utc_offset
 time_zoneEastern Time (US  Canada)/time_zone
 -
 profile_background_image_url
 http://static.twitter.com/images/themes/theme9/bg.gif
 /profile_background_image_url
 profile_background_tilefalse/profile_background_tile
 statuses_count6221/statuses_count
 notificationsfalse/notifications
 followingfalse/following
 /sender
 -
 recipient
 id11173402/id
 nameDaniel Crenna/name
 screen_namedimebrain/screen_name
 locationOttawa (soon)/location
 -
 description
 Daniel Crenna builds social software. Writing a book on Twitter
 development, and creating TweetSharp with @jdiller.
 /description
 -
 profile_image_url

 http://s3.amazonaws.com/twitter_production/profile_images/87135858/0065_540_normal.png
 /profile_image_url
 urlhttp://www.dimebrain.com/url
 protectedfalse/protected
 followers_count378/followers_count
 profile_background_color050f10/profile_background_color
 profile_text_color33/profile_text_color
 profile_link_color0084B4/profile_link_color
 profile_sidebar_fill_colore0e0e0/profile_sidebar_fill_color
 profile_sidebar_border_color00/profile_sidebar_border_color
 friends_count290/friends_count
 created_atFri Dec 14 18:48:52 + 2007/created_at
 favourites_count63/favourites_count
 utc_offset-14400/utc_offset
 time_zoneAtlantic Time (Canada)/time_zone
 -
 profile_background_image_url

 http://s3.amazonaws.com/twitter_production/profile_background_images/3243957/Social_Background.png
 /profile_background_image_url
 profile_background_tilefalse/profile_background_tile
 statuses_count894/statuses_count
 notifications0/notifications
 following0/following
 /recipient
 /direct_message
 /direct-messages

 The part of interest is the fact that the sender's notifications/
 following elements are populated with false while the recipient's
 values for the same are 0's -- smells like a bug, but wanted to check
 here first.



[twitter-dev] Re: [oAuth] Signature with GET Parameters

2009-04-20 Thread max

Ah thanks guys, I guess I overlooked that in the spec, or should I say
overlooked that 100 times.
Does the trick, thanks!

On Apr 20, 6:24 pm, Guan Yang g...@yang.dk wrote:
 On Mon, Apr 20, 2009 at 11:16, max maxnet...@gmail.com wrote:
  All is working well with oAuth, normal GET requests, POST request with
  or without data. However GET requests with parameters do not work.
  (php, self written). I keep getting a Failed to validate oauth
  signature or token.

  This is the base signature string:
  GEThttp%3A%2F%2Ftwitter.com%2Fstatuses
  %2Freplies.jsonoauth_consumer_key%3DwHwEqxY9SGIzQfxUvsNkDw
  %26oauth_nonce%3D5548448e3b10dad18c3b38d8f7a9a9fa
  %26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp
  %3D1240240406%26oauth_token%3D14733270-
  Zers1INc93ugsxwtaTYow6tDqI9uYyPbsBEVyCGhw%26oauth_version%3D1.0%26count
  %3D2

 How are you generating the signature base string?

 The parameters are supposed to be sorted by key, so count=2 should be
 at the beginning, before oauth_consumer_key.

 But that doesn't explain why your POSTs are okay.

 Guan


[twitter-dev] Re: How long until a @reply can be duplicated / repeated?

2009-04-20 Thread Chad Etzel

twitter ignores updates that are an exact duplicate of the previous update.
if you post
@bob hi!
then
@bob hi!!

you should see both.
-chad

On Mon, Apr 20, 2009 at 3:31 PM, Ryan ryanlowderm...@gmail.com wrote:

 I send the following message: @bob hi! and wait two minutes and send
 the same message, @bob hi!

 I only see one message when polling the mentions/replies API.

 Is there an undocumented interval on how long one has to wait until
 the second message shows up in the API? Or... how long the user
 sending the @reply has to wait???



[twitter-dev] Re: Cache search results and advanced search

2009-04-20 Thread Matt

Looks like I am ready to show off my project even though it is a work
in progress. I love open development and since this project is for
fun, not money, I figured I'd open it up and get some feedback. I'm
doing a few broad searches for tweets that appear to be personal
forsale or classified ads. I know a few other sites are doing this,
but I'm taking a different approach by not just looking for certain
hashtags, although they are weighted highly. All tweets are stored
locally so I can run them through a few spam killers, which still need
some work. I also just started gathering location data, although it
hasn't been implemented into the search yet.

http://www.twitshop.com


On Apr 7, 11:37 am, Doug Williams d...@twitter.com wrote:
 Matt,
 You can easily combine steps 3 and 4 by using the tweet's status_id as the
 primary key in the table you are using to store the updates. Any duplicates
 will be implicitly rejected by the database upon insertion.

 And as Chad said, please share when you can :)

 Thanks,
 Doug Williams
 Twitter API Supporthttp://twitter.com/dougw

 On Tue, Apr 7, 2009 at 8:04 AM, Chad Etzel jazzyc...@gmail.com wrote:

  Hi Matt,

  Yep, that sounds like a very reasonable plan of action. 20 calls/hr is
  way below the Search rate-limit threshold, so you're fine there.

  If there is some niche overlap with some of your keywords, you might
  be able to preemptively filter out some tweets by using the not
  filter w/ the Search API.

  example:
  I want tweets about Apple (computers), but not people talking about
  apples and oranges.

  I can search for apple -orange -oranges which will eliminate tweets
  with orange or oranges from the results.

  Can you share your app?  I'm interested to see what it's doing :)

  -Chad

  On Tue, Apr 7, 2009 at 9:50 AM, Matt matthewk...@gmail.com wrote:

   Hello all,

   My app has quickly outgrown the basic functionality of the search API.
   I am searching for a few specific hash tags along with some keywords
   to pull out a niche group of tweets. This results in about a 35%
   return of non-related tweets that are cluttering up my results. I am
   not looking into a method to cache these results to a database so I
   can do some advanced filtering and not hammer the api with requests.

   I'm kinda talking outloud, but here is what I'm thinking. (PHP
   MySQL)

   1. I have 4 main queries that I need to run to get all results.
   2. Setup a cron job that'll query the api hourly.
   3. Parse through the results and store into temp database
   4. Check for duplicate tweets since more than 1 query may return the
   same result
   5. Since we can only return 100 results at a time I'll have to loop
   through pages and make additional queries. I don't think this will
   happen much as my search is very niche. Count tweets return vs
   expected results to detect end of results.
   6. I'll store since_id in a config table as to not return redundant
   tweets.

   Once the data is in the database I should easily be able to filter out
   most of the spam using other methods not available through the search
   api. This should also make twitter happy as I am cutting down on api
   request drastically. Even if I bump my cron up to 15mins I would only
   be making  20 calls an hour. Does this sound like a reasonable basic
   plan? Is there anything I am overlooking?

   Thanks for reading!


[twitter-dev] Re: How long until a @reply can be duplicated / repeated?

2009-04-20 Thread Ryan

Chad,

If Twitter ignores duplicate updates - I would OR would NOT see the
updates on a poll of the replies/mentions API? Sorry - the your
message was a bit confusing!! :) :)

On Apr 20, 12:35 pm, Chad Etzel jazzyc...@gmail.com wrote:
 twitter ignores updates that are an exact duplicate of the previous update.
 if you post
 @bob hi!
 then
 @bob hi!!

 you should see both.
 -chad



 On Mon, Apr 20, 2009 at 3:31 PM, Ryan ryanlowderm...@gmail.com wrote:

  I send the following message: @bob hi! and wait two minutes and send
  the same message, @bob hi!

  I only see one message when polling the mentions/replies API.

  Is there an undocumented interval on how long one has to wait until
  the second message shows up in the API? Or... how long the user
  sending the @reply has to wait???


[twitter-dev] Re: How long until a @reply can be duplicated / repeated?

2009-04-20 Thread Ryan

Chad,

If Twitter ignores duplicate updates than I WOULD or WOULD NOT see the
updates?

On Apr 20, 12:35 pm, Chad Etzel jazzyc...@gmail.com wrote:
 twitter ignores updates that are an exact duplicate of the previous update.
 if you post
 @bob hi!
 then
 @bob hi!!

 you should see both.
 -chad



 On Mon, Apr 20, 2009 at 3:31 PM, Ryan ryanlowderm...@gmail.com wrote:

  I send the following message: @bob hi! and wait two minutes and send
  the same message, @bob hi!

  I only see one message when polling the mentions/replies API.

  Is there an undocumented interval on how long one has to wait until
  the second message shows up in the API? Or... how long the user
  sending the @reply has to wait???


[twitter-dev] Re: TimeLine of 3~4 users

2009-04-20 Thread stevenic

So why can't you do this?

http://search.twitter.com/search.atom?lang=enq=from%3Aaplusk+OR+from%3Amashable+OR+from%3Atechcrunch

If your queries under 140 characters, you should be able to retrieve
the public updates for multiple users using the search API.  You just
use the from: filter and OR operator.

-steve

On Apr 20, 1:26 am, Raquibul Islam ranacs...@gmail.com wrote:
 Hello peter
 thanks for ur replay . U got me right .Thanks for the advice .





 Peter Denton wrote:
  Hi Raquibul,
  I know what you are asking and it is not possible. Basically, if I may
  guess, you want to make a group of 3 people you follow and be able
  to make a call to their stream collated. You can not do this with an
  API method, however there are plenty of tools like magpie rss that can
  grab 3 feeds and parse them into one feed, to achieve what you are
  looking for.

  On Sun, Apr 19, 2009 at 9:40 PM, Raquibul Islam ranacs...@gmail.com
  mailto:ranacs...@gmail.com wrote:

      i saw this before . How can i call with 3 users name together ?

      Abraham Williams wrote:
       Use

     http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-statuses-user_t...
       for the 3 or 4 users.

       On Sun, Apr 19, 2009 at 16:06, ranacse05 ranacs...@gmail.com
      mailto:ranacs...@gmail.com
       mailto:ranacs...@gmail.com mailto:ranacs...@gmail.com wrote:

           Hello
           suppose i'm following 100 users , how can i get the twittes
      only from
           3 or 4 users ???

           I meant using the api , so that the page will show the
      selected users
           status only .

       --
       Abraham Williams |http://the.hackerconundrum.com
       Hacker |http://abrah.am|http://twitter.com/abraham
       Web608 | Community Evangelist |http://web608.org
       This email is: [ ] blogable [x] ask first [ ] private.
       Sent from Madison, Wisconsin, United States

      --
      Regards

      Rana
      homepage:http://ranacse05.wordpress.com
      Bangla job site:http://jobs.mukto.org

  --
  Peter M. Denton
 www.twibs.comhttp://www.twibs.com
  i...@twibs.com mailto:i...@twibs.com

  Twibs makes Top 20 apps on Twitter -http://tinyurl.com/bopu6c

 --
 Regards

 Rana
 homepage:http://ranacse05.wordpress.com
 Bangla job site:http://jobs.mukto.org- Hide quoted text -

 - Show quoted text -


[twitter-dev] Re: How long until a @reply can be duplicated / repeated?

2009-04-20 Thread Chad Etzel

You would NOT see the duplicate update.  Twitter effectively drops the
update when it's a duplicate.  It's cast into the void.  The fail
whale noms it. It's a dead parrot :)

-Chad

On Mon, Apr 20, 2009 at 4:01 PM, Ryan ryanlowderm...@gmail.com wrote:

 Chad,

 If Twitter ignores duplicate updates than I WOULD or WOULD NOT see the
 updates?

 On Apr 20, 12:35 pm, Chad Etzel jazzyc...@gmail.com wrote:
 twitter ignores updates that are an exact duplicate of the previous update.
 if you post
 @bob hi!
 then
 @bob hi!!

 you should see both.
 -chad



 On Mon, Apr 20, 2009 at 3:31 PM, Ryan ryanlowderm...@gmail.com wrote:

  I send the following message: @bob hi! and wait two minutes and send
  the same message, @bob hi!

  I only see one message when polling the mentions/replies API.

  Is there an undocumented interval on how long one has to wait until
  the second message shows up in the API? Or... how long the user
  sending the @reply has to wait???



[twitter-dev] Re: TimeLine of 3~4 users

2009-04-20 Thread Chad Etzel

You can, provided it's under 140 characters and the accounts are
public.  If you get up to about 5 or more accounts, you'll have to
make multiple calls, and you're back to merging them together again.
-Chad

On Mon, Apr 20, 2009 at 4:04 PM, stevenic ick...@gmail.com wrote:

 So why can't you do this?

 http://search.twitter.com/search.atom?lang=enq=from%3Aaplusk+OR+from%3Amashable+OR+from%3Atechcrunch

 If your queries under 140 characters, you should be able to retrieve
 the public updates for multiple users using the search API.  You just
 use the from: filter and OR operator.

 -steve

 On Apr 20, 1:26 am, Raquibul Islam ranacs...@gmail.com wrote:
 Hello peter
 thanks for ur replay . U got me right .Thanks for the advice .





 Peter Denton wrote:
  Hi Raquibul,
  I know what you are asking and it is not possible. Basically, if I may
  guess, you want to make a group of 3 people you follow and be able
  to make a call to their stream collated. You can not do this with an
  API method, however there are plenty of tools like magpie rss that can
  grab 3 feeds and parse them into one feed, to achieve what you are
  looking for.

  On Sun, Apr 19, 2009 at 9:40 PM, Raquibul Islam ranacs...@gmail.com
  mailto:ranacs...@gmail.com wrote:

  i saw this before . How can i call with 3 users name together ?

  Abraham Williams wrote:
   Use

 http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-statuses-user_t...
   for the 3 or 4 users.

   On Sun, Apr 19, 2009 at 16:06, ranacse05 ranacs...@gmail.com
  mailto:ranacs...@gmail.com
   mailto:ranacs...@gmail.com mailto:ranacs...@gmail.com wrote:

   Hello
   suppose i'm following 100 users , how can i get the twittes
  only from
   3 or 4 users ???

   I meant using the api , so that the page will show the
  selected users
   status only .

   --
   Abraham Williams |http://the.hackerconundrum.com
   Hacker |http://abrah.am|http://twitter.com/abraham
   Web608 | Community Evangelist |http://web608.org
   This email is: [ ] blogable [x] ask first [ ] private.
   Sent from Madison, Wisconsin, United States

  --
  Regards

  Rana
  homepage:http://ranacse05.wordpress.com
  Bangla job site:http://jobs.mukto.org

  --
  Peter M. Denton
 www.twibs.comhttp://www.twibs.com
  i...@twibs.com mailto:i...@twibs.com

  Twibs makes Top 20 apps on Twitter -http://tinyurl.com/bopu6c

 --
 Regards

 Rana
 homepage:http://ranacse05.wordpress.com
 Bangla job site:http://jobs.mukto.org- Hide quoted text -

 - Show quoted text -



[twitter-dev] Re: TimeLine of 3~4 users

2009-04-20 Thread stevenic

 You can, provided it's under 140 characters and the accounts are
 public.  If you get up to about 5 or more accounts, you'll have to
 make multiple calls, and you're back to merging them together again.
 -Chad

Right... But even if you have to spread things out across 4 or 5
calls, because you have 20 - 25 users, it's less round trips to the
server.

I know they're working to combine the Search API's with the other REST
API's but at some point it would be great if there was a single query
API that could be used to replace all of the other retrieval API's.
And hopefully it wouldn't have a 140 character limit :)

One thing I really like about programming against Facebook is their
query language.  FQL rocks!  But for openess Twitter rocks!  I'd just
like to see Twitter get something on a par with FQL.

-steve


[twitter-dev] Re: Read and store Twitter responses

2009-04-20 Thread CWitt

Is there anywhere I could take a look at some of this code to store
the Twitter data in a MySQL databases?

On Apr 19, 8:50 pm, Nick Arnett nick.arn...@gmail.com wrote:
 On Sun, Apr 19, 2009 at 2:45 PM, CWitt wittma...@gmail.com wrote:

  My skills are rather limited, but I was thinking PHP and MySQL. I was
  thinking about hiring it out, but putting together the process flow to
  help the programmer and also help me find the correct programmer.

 PHP and MySQL sound appropriate to what you're hoping to do.  Storing
 Twitter data in MySQL is generally not a big deal, since there is such
 limited data.  A lot of us have probably created similar schemas for that
 purpose.  The rest of your code sounds slightly more complex, especially if
 you're trying to do some sort of natural language parsing, which is always
 hard.  I don't know if there are libraries in PHP for that purpose.  There
 are in other languages.

 In any case, without specifics, it would be hard for anyone to guide you.

 Nick


[twitter-dev] Re: TimeLine of 3~4 users

2009-04-20 Thread Raquibul Islam

I agree with u . FQL allow developers to make the call as we like :)

stevenic wrote:
 You can, provided it's under 140 characters and the accounts are
 public.  If you get up to about 5 or more accounts, you'll have to
 make multiple calls, and you're back to merging them together again.
 -Chad
 

 Right... But even if you have to spread things out across 4 or 5
 calls, because you have 20 - 25 users, it's less round trips to the
 server.

 I know they're working to combine the Search API's with the other REST
 API's but at some point it would be great if there was a single query
 API that could be used to replace all of the other retrieval API's.
 And hopefully it wouldn't have a 140 character limit :)

 One thing I really like about programming against Facebook is their
 query language.  FQL rocks!  But for openess Twitter rocks!  I'd just
 like to see Twitter get something on a par with FQL.

 -steve

   


-- 
Regards

Rana
homepage: http://ranacse05.wordpress.com
Bangla job site: http://jobs.mukto.org



[twitter-dev] Re: Read and store Twitter responses

2009-04-20 Thread Andrew Badera
This isn't a SQL tutorial nor a MySQL list. Some might suggest you'd be
better off learning the basics of what you're trying to do -- learning how
to walk before you can run and all that.

Thanks-
- Andy Badera
- and...@badera.us
- Google me: http://www.google.com/search?q=andrew+badera



On Mon, Apr 20, 2009 at 4:41 PM, CWitt wittma...@gmail.com wrote:


 Is there anywhere I could take a look at some of this code to store
 the Twitter data in a MySQL databases?

 On Apr 19, 8:50 pm, Nick Arnett nick.arn...@gmail.com wrote:
  On Sun, Apr 19, 2009 at 2:45 PM, CWitt wittma...@gmail.com wrote:
 
   My skills are rather limited, but I was thinking PHP and MySQL. I was
   thinking about hiring it out, but putting together the process flow to
   help the programmer and also help me find the correct programmer.
 
  PHP and MySQL sound appropriate to what you're hoping to do.  Storing
  Twitter data in MySQL is generally not a big deal, since there is such
  limited data.  A lot of us have probably created similar schemas for that
  purpose.  The rest of your code sounds slightly more complex, especially
 if
  you're trying to do some sort of natural language parsing, which is
 always
  hard.  I don't know if there are libraries in PHP for that purpose.
  There
  are in other languages.
 
  In any case, without specifics, it would be hard for anyone to guide you.
 
  Nick



[twitter-dev] Re: Cache search results and advanced search

2009-04-20 Thread Nick Arnett
On Tue, Apr 7, 2009 at 6:50 AM, Matt matthewk...@gmail.com wrote:



 4. Check for duplicate tweets since more than 1 query may return the
 same result


The database will do this for you if you make statusID a unique column and
use INSERT IGNORE when you add rows. It will just ignore the duplicate rows.



 5. Since we can only return 100 results at a time I'll have to loop
 through pages and make additional queries


FYI, you're not really making additional queries to get more than 100
results, you're just asking for the next page of results from the same
query.


 6. I'll store since_id in a config table as to not return redundant
 tweets.


You could just get the maximum statusID in your database, avoiding the need
to store it separately... just don't delete that row until you have
retrieved the next set.



 Once the data is in the database I should easily be able to filter out
 most of the spam using other methods not available through the search
 api. This should also make twitter happy as I am cutting down on api
 request drastically. Even if I bump my cron up to 15mins I would only
 be making  20 calls an hour. Does this sound like a reasonable basic
 plan? Is there anything I am overlooking?


You're counting each page as a separate API call, right?  If you do this
four times an hour, with four queries, that's 16 queries.  If you get five
pages of results per query, that's 80 API calls... but I wouldn't worry
about hitting the limits even at that rate.

Nick


[twitter-dev] Re: problem with http://twitter.com/statuses/update.xml

2009-04-20 Thread Matt Sanford

Hi there,

   I don't see an issue with the code, and as you said it works for
one user and not another. Can you tell me what users it does and does
not work for? A few other things you can try:

 1. Change the password of the user it's not working for and trying
with the new password
 2. Setting curl_setopt($ch, CURLOPT_VERBOSE, 1) and send the standard
error output from your script (probably in the Apache error log,
unless you run from the command line)
» If you provide that info please be sure to obscure the
'Authorization' header so we don't all know your password.

Thanks;
  — Matt

On Apr 20, 2:28 am, Adrian spiritpo...@gmail.com wrote:
 PHP code used:

 Hence the error message given is could not authenticate -$response

 while( $message = array_pop($messages) ){
 $ch = curl_init('http://twitter.com/statuses/update.xml');
         curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
         curl_setopt($ch, CURLOPT_POST, 1);
 curl_setopt($ch, CURLOPT_POSTFIELDS, 'status='.urlencode($message));
         curl_setopt($ch, CURLOPT_USERPWD, $settings['twitter-username'].':'.
 $settings['twitter-password']);
         $response = curl_exec($ch);
         $resp = curl_getinfo($ch, CURLINFO_HTTP_CODE);
         curl_close($ch);
         echo  'brposted '.urlencode($message).'br';
         if ( $resp != '200' )
                 die('Problem with twitter. We should try later. Twitter 
 reported: '.
 $response);
         else
                 sleep(5);//Sleep 5 seconds before the next update

 }

 On Apr 20, 11:48 am, Abraham Williams 4bra...@gmail.com wrote:

  It would be helpful if you provided code and more details.

  On Mon, Apr 20, 2009 at 02:14, Adrian spiritpo...@gmail.com wrote:

   Also, for the account that works, if I changes its screen name to the
   account that doesn't work well, that working account stops working
   properly.

   On Apr 20, 10:12 am, Adrian spiritpo...@gmail.com wrote:
I have a php script that posts updates tohttp://
   twitter.com/statuses/update.xml

It works reliably when posting to one account of mine, but when
switching to another, it constantly says Problem with Twitter. Could
not authenticate you. Try again later.

I try again later, multiple times, and only sometimes it will actually
work. With the other account it always works, so there's something up
with Twitter and some accounts for such updating.

  --
  Abraham Williams |http://the.hackerconundrum.com
  Hacker |http://abrah.am|http://twitter.com/abraham
  Web608 | Community Evangelist |http://web608.org
  This email is: [ ] blogable [x] ask first [ ] private.


[twitter-dev] status update example in Ruby with OAuth...

2009-04-20 Thread alexre...@gmail.com

Hi there,

I've been using the Twitter API for a while now using HTTP
authentication to do posts for my two Twitter apps and I'm trying to
get my head around OAuth.  I setup a test app successfully following
the instructions here:  http://apiwiki.twitter.com/OAuth+Example+-+Ruby

The example given is a get request, which I get.  I took a look at
the OAuth gem documentation and have been trying to do a simple status
update and haven't been having any luck.

Following the format of the tutorial link above, I've tried
constructing a post like this...

@response = UsersController.consumer.request(:post, '/statuses/
update.xml', @access_token, {:status = 'testing a post from my sample
app'}, { 'Content-Type' = 'application/xml' })

Do i need to encode the status?  It's currently failing.  If someone
could post an example, it would be really helpful.

Thanks,
-A


[twitter-dev] Re: How long until a @reply can be duplicated / repeated?

2009-04-20 Thread Doug Williams
Adding this to the statuses/update documentation.

Doug Williams
Twitter API Support
http://twitter.com/dougw


On Mon, Apr 20, 2009 at 1:34 PM, Ryan ryanlowderm...@gmail.com wrote:


 Thanks Chad!

 On Apr 20, 1:08 pm, Chad Etzel jazzyc...@gmail.com wrote:
  You would NOT see the duplicate update.  Twitter effectively drops the
  update when it's a duplicate.  It's cast into the void.  The fail
  whale noms it. It's a dead parrot :)
 
  -Chad
 
 
 
  On Mon, Apr 20, 2009 at 4:01 PM, Ryan ryanlowderm...@gmail.com wrote:
 
   Chad,
 
   If Twitter ignores duplicate updates than I WOULD or WOULD NOT see the
   updates?
 
   On Apr 20, 12:35 pm, Chad Etzel jazzyc...@gmail.com wrote:
   twitter ignores updates that are an exact duplicate of the previous
 update.
   if you post
   @bob hi!
   then
   @bob hi!!
 
   you should see both.
   -chad
 
   On Mon, Apr 20, 2009 at 3:31 PM, Ryan ryanlowderm...@gmail.com
 wrote:
 
I send the following message: @bob hi! and wait two minutes and send
the same message, @bob hi!
 
I only see one message when polling the mentions/replies API.
 
Is there an undocumented interval on how long one has to wait until
the second message shows up in the API? Or... how long the user
sending the @reply has to wait???



[twitter-dev] Re: This Feature is Temporarily Disabled OAuth Authenticate

2009-04-20 Thread Alex Payne

Yes. There's an issue with our OAuth implementation that we're
currently working to resolve. Please keep in mind that OAuth is still
in beta, albeit in public data. We expect a resolution to this issue
in the next 48 hours.

On Mon, Apr 20, 2009 at 14:55, Jesse Stay jesses...@gmail.com wrote:
 I'm getting This Feature is Temporarily Disabled when running
 oauth/authenticate - is it down right now?
 @Jesse



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


[twitter-dev] Search API Rate Limited even with OAuth

2009-04-20 Thread Ammo Collector

Hello,

We're getting 503 rate limit responses from Search API even when
passing in OAuth tokens.  The same tokens used on friends/followers/
statuses go through fine so we know the tokens are good.  It appears
we're getting IP limited even with OAuth...

Klout.net


[twitter-dev] Re: Read and store Twitter responses

2009-04-20 Thread Doug Williams
I've broken the task into logical steps to get you started. I'd suggest
searching Google and the wiki [1] for the libraries and implementation
details for each:

1. Download a timeline or a set of statuses.
2. Iterate through that set of statuses, pulling out each individual status.
3. For each status in the set, perform an SQL insert to save the status.

A great way to learn is to try and find sample code that gets you each of
these steps separately, then put them together. There is plenty of PHP and
MySQL sample code available online or in books to get you started.

1. http://apiwiki.twitter.com/Libraries#PHP

Thanks,
Doug Williams
Twitter API Support
http://twitter.com/dougw


On Mon, Apr 20, 2009 at 1:53 PM, Andrew Badera and...@badera.us wrote:

 This isn't a SQL tutorial nor a MySQL list. Some might suggest you'd be
 better off learning the basics of what you're trying to do -- learning how
 to walk before you can run and all that.

 Thanks-
 - Andy Badera
 - and...@badera.us
 - Google me: http://www.google.com/search?q=andrew+badera




 On Mon, Apr 20, 2009 at 4:41 PM, CWitt wittma...@gmail.com wrote:


 Is there anywhere I could take a look at some of this code to store
 the Twitter data in a MySQL databases?

 On Apr 19, 8:50 pm, Nick Arnett nick.arn...@gmail.com wrote:
  On Sun, Apr 19, 2009 at 2:45 PM, CWitt wittma...@gmail.com wrote:
 
   My skills are rather limited, but I was thinking PHP and MySQL. I was
   thinking about hiring it out, but putting together the process flow to
   help the programmer and also help me find the correct programmer.
 
  PHP and MySQL sound appropriate to what you're hoping to do.  Storing
  Twitter data in MySQL is generally not a big deal, since there is such
  limited data.  A lot of us have probably created similar schemas for
 that
  purpose.  The rest of your code sounds slightly more complex, especially
 if
  you're trying to do some sort of natural language parsing, which is
 always
  hard.  I don't know if there are libraries in PHP for that purpose.
  There
  are in other languages.
 
  In any case, without specifics, it would be hard for anyone to guide
 you.
 
  Nick





[twitter-dev] Re: Search API Rate Limited even with OAuth

2009-04-20 Thread Doug Williams
Please see our article on rate limiting [1]. You will learn why the Search
API does not have a notion of authentication and how its rate limiting
differs from the REST API.

1. http://apiwiki.twitter.com/Rate-limiting

Thanks,
Doug Williams
Twitter API Support
http://twitter.com/dougw


On Mon, Apr 20, 2009 at 3:14 PM, Ammo Collector binhqtra...@gmail.comwrote:


 Hello,

 We're getting 503 rate limit responses from Search API even when
 passing in OAuth tokens.  The same tokens used on friends/followers/
 statuses go through fine so we know the tokens are good.  It appears
 we're getting IP limited even with OAuth...

 Klout.net



[twitter-dev] Re: Read and store Twitter responses

2009-04-20 Thread Nick Arnett
On Mon, Apr 20, 2009 at 3:16 PM, Doug Williams d...@twitter.com wrote:

3. For each status in the set, perform an SQL insert to save the status.


Or, I would hope, create an array of inserts and do a multi-insert, which
will be far faster than iterating through a list.

http://www.desilva.biz/mysql/insert.html

I'll bet you knew that, but I just had to note it because the performance
difference is enormous.

Nick
(not really a PHP guy, but years of (often painfully gained) MySQL
performance knowledge)


[twitter-dev] Re: Read and store Twitter responses

2009-04-20 Thread Doug Williams
Nick,
Batch INSERTs are great for people looking to for performance tweaks. Serial
INSERT statements within the iteration loop keeps things simple for those
just starting out.

Doug Williams
Twitter API Support
http://twitter.com/dougw


On Mon, Apr 20, 2009 at 4:14 PM, Nick Arnett nick.arn...@gmail.com wrote:



 On Mon, Apr 20, 2009 at 3:16 PM, Doug Williams d...@twitter.com wrote:

 3. For each status in the set, perform an SQL insert to save the status.


 Or, I would hope, create an array of inserts and do a multi-insert, which
 will be far faster than iterating through a list.

 http://www.desilva.biz/mysql/insert.html

 I'll bet you knew that, but I just had to note it because the performance
 difference is enormous.

 Nick
 (not really a PHP guy, but years of (often painfully gained) MySQL
 performance knowledge)



[twitter-dev] Re: Read and store Twitter responses

2009-04-20 Thread Nick Arnett
On Mon, Apr 20, 2009 at 5:41 PM, Doug Williams d...@twitter.com wrote:

 Nick,
 Batch INSERTs are great for people looking to for performance tweaks.
 Serial INSERT statements within the iteration loop keeps things simple for
 those just starting out.


True, of course... and now that I think about it, double-byte characters in
the midst of a failing multi insert can be hard to figure out if you don't
know what you're doing.

Speaking of which, anybody who is getting started in this sort of thing -
setting the default character set in MySQL to UTF-8 (before creating
tables!) will help avoid a lot of confusion and headaches that drove me
slightly nuts and I'm far from a newbie.

Nick


[twitter-dev] OAuth and Perl

2009-04-20 Thread Jesse Stay
I'm getting 401 Unauthorized when trying to use Net::OAuth in Perl to access
Twitter - it's happening in trying to swap the request token for the access
token (in the second block below, from the $ua-post()).  I was just
wondering what the best method for debugging this would be.  Here's my code
(it's in Catalyst, so the $c's are from the Framework environment):

sub authenticate_twitter : Local {
my ($self, $c) = @_;

unless ($c-user_session-{'request_token'} 
$c-user_session-{'request_token_secret'}) {
my $request = Net::OAuth-request(request token)-new(
consumer_key = $c-config-{'twitter_consumer_key'},
consumer_secret = $c-config-{'twitter_consumer_secret'},
request_url = $c-config-{'twitter_request_url'},
request_method = 'GET',
signature_method = 'HMAC-SHA1',
timestamp = time,
nonce = join('', rand_chars(size=16, set='alphanumeric')),
);
$request-sign();

$c-log-debug(URL: .$request-to_url);

my $ua = LWP::UserAgent-new;
my $res = $ua-get($request-to_url); # post request to Twitter

if ($res-is_success) {
my $response = Net::OAuth-response('request
token')-from_post_body($res-content);
$c-user_session-{'request_token'} = $response-token;
$c-user_session-{'request_token_secret'} =
$response-token_secret;

if (defined $c-user_session-{'request_token'}) {
my $auth_url =
$c-config-{'twitter_authorize_token_url'}.?oauth_token= .
$c-user_session-{'request_token'} .
redirect_url=.uri_escape($c-req-param(redi
rect_url));;
$c-res-redirect($auth_url);
$c-detach;
return;
}
}
else {
$c-log-fatal(Something went wrong.);
}
}
else {
$c-log-debug(request_token:
.$c-user_session-{'request_token'});
$c-log-debug(request_token_secret:
.$c-user_session-{'request_token_secret'});
my $request = Net::OAuth-request(access token)-new(
consumer_key= $c-config-{'twitter_consumer_key'},
consumer_secret = $c-config-{'twitter_consumer_secret'},
token   = $c-user_session-{'request_token'},
token_secret=
$c-user_session-{'request_token_secret'},
request_url = $c-config-{'twitter_access_token_url'},
request_method  = 'POST',
signature_method= 'HMAC-SHA1',
timestamp   = time,
nonce   = join('', rand_chars(size=16,
set='alphanumeric')),
);
$request-sign();

$c-log-debug(URL: .$request-to_url);

my $ua = LWP::UserAgent-new;
my $res = $ua-post($request-to_url); # post request to Twitter

if ($res-is_success) {
my $response = Net::OAuth-response('access
token')-from_post_body($res-content);
$c-user_session-{'access_token'} = $response-token;
$c-user_session-{'access_token_secret'} =
$response-token_secret;

$c-res-redirect(uri_unescape($c-req-param('redirect_url')));
}
else {
$c-log-fatal(Could not get an Access Token:  .
$res-status_line .   . $res-content);
}

}

}

-...@jesse


[twitter-dev] Re: This Feature is Temporarily Disabled OAuth Authenticate

2009-04-20 Thread Jesse Stay
Is it just affecting the authenticate method, or are there other areas we
need to be aware of?  I'm just trying to debug my code and want to know what
areas are on my end and what are on Twitter's.
Thanks,

Jesse

On Mon, Apr 20, 2009 at 4:02 PM, Alex Payne a...@twitter.com wrote:


 Yes. There's an issue with our OAuth implementation that we're
 currently working to resolve. Please keep in mind that OAuth is still
 in beta, albeit in public data. We expect a resolution to this issue
 in the next 48 hours.

 On Mon, Apr 20, 2009 at 14:55, Jesse Stay jesses...@gmail.com wrote:
  I'm getting This Feature is Temporarily Disabled when running
  oauth/authenticate - is it down right now?
  @Jesse



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



[twitter-dev] Re: Read and store Twitter responses

2009-04-20 Thread Joseph

This may not be the best thing to do in the case of statuses.
Optimization implies that you have two tables (minimum), one for the
user info, and one for the tweets. Doing a batch update, means that
you're skipping the step of checking to see if the user is already in
the database, so for every tweet, you will add the same user again.
That will you will slow you down much more than the batch advantage,
and will create confusion (unless you store all in one table, and
that's even more burdensome).

Now, does anyone know if there's some obscure version of UPDATE that
takes parameters to allow me to use UPDATE instead of INSERT (saving
me from the extra step of checking of the person is already in my
database). I'm fairly new to MySQL.

On Apr 20, 4:14 pm, Nick Arnett nick.arn...@gmail.com wrote:
 On Mon, Apr 20, 2009 at 3:16 PM, Doug Williams d...@twitter.com wrote:

 3. For each status in the set, perform an SQL insert to save the status.

 Or, I would hope, create an array of inserts and do a multi-insert, which
 will be far faster than iterating through a list.

 http://www.desilva.biz/mysql/insert.html

 I'll bet you knew that, but I just had to note it because the performance
 difference is enormous.

 Nick
 (not really a PHP guy, but years of (often painfully gained) MySQL
 performance knowledge)


[twitter-dev] Re: Read and store Twitter responses

2009-04-20 Thread Abraham Williams
http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html

On Mon, Apr 20, 2009 at 19:59, Joseph northwest...@gmail.com wrote:


 This may not be the best thing to do in the case of statuses.
 Optimization implies that you have two tables (minimum), one for the
 user info, and one for the tweets. Doing a batch update, means that
 you're skipping the step of checking to see if the user is already in
 the database, so for every tweet, you will add the same user again.
 That will you will slow you down much more than the batch advantage,
 and will create confusion (unless you store all in one table, and
 that's even more burdensome).

 Now, does anyone know if there's some obscure version of UPDATE that
 takes parameters to allow me to use UPDATE instead of INSERT (saving
 me from the extra step of checking of the person is already in my
 database). I'm fairly new to MySQL.

 On Apr 20, 4:14 pm, Nick Arnett nick.arn...@gmail.com wrote:
  On Mon, Apr 20, 2009 at 3:16 PM, Doug Williams d...@twitter.com wrote:
 
  3. For each status in the set, perform an SQL insert to save the status.
 
  Or, I would hope, create an array of inserts and do a multi-insert, which
  will be far faster than iterating through a list.
 
  http://www.desilva.biz/mysql/insert.html
 
  I'll bet you knew that, but I just had to note it because the performance
  difference is enormous.
 
  Nick
  (not really a PHP guy, but years of (often painfully gained) MySQL
  performance knowledge)




-- 
Abraham Williams | http://the.hackerconundrum.com
Hacker | http://abrah.am | http://twitter.com/abraham
Web608 | Community Evangelist | http://web608.org
This email is: [ ] blogable [x] ask first [ ] private.
Sent from Madison, Wisconsin, United States


[twitter-dev] Inconsistent results from /statuses/friends.json

2009-04-20 Thread askp

I'm getting inconsistent values in the following field of the result
from /statuses/friends.json. This used to work but it started to break
down a few days ago.

Here's a sample output for an authenticated call for the user navgle

[0] = Array
(
[notifications] =
[description] =
[utc_offset] = 32400
[favourites_count] = 1
[profile_sidebar_fill_color] = e0ff92
[profile_image_url] =
http://s3.amazonaws.com/twitter_production/profile_images/118094065/70_normal.jpg
[following] = 2
[statuses_count] = 6
[profile_sidebar_border_color] = 87bc44
[followers_count] = 11
[profile_background_tile] =
[url] = http://ymha.wordpress.com
[screen_name] = ymha
[name] = Young Mok Ha
[friends_count] = 37
[protected] =
[status] = Array
(
[in_reply_to_user_id] =
[text] = 어제는 회사에서 워크샵을 다녀왔습니다
[favorited] =
[in_reply_to_screen_name] =
[created_at] = Sat Apr 11 01:13:48 + 2009
[truncated] =
[id] = 1494364130
[in_reply_to_status_id] =
[source] = web
)

[profile_background_color] = 9ae4e8
[profile_background_image_url] =
http://static.twitter.com/images/themes/theme1/bg.gif
[created_at] = Wed Apr 01 07:35:13 + 2009
[profile_text_color] = 00
[location] = seoul
[id] = 28068985
[time_zone] = Seoul
[profile_link_color] = ff
)

[1] = Array
(
[profile_background_image_url] =
http://static.twitter.com/images/themes/theme1/bg.gif
[profile_sidebar_fill_color] = e0ff92
[screen_name] = onlinsystem__
[statuses_count] = 0
[profile_sidebar_border_color] = 87bc44
[location] =
[profile_background_tile] =
[utc_offset] =
[created_at] = Mon Apr 20 00:27:00 + 2009
[name] = intmktr
[profile_background_color] = 9ae4e8
[followers_count] = 8
[protected] =
[description] =
[following] = 0
[friends_count] = 961
[profile_text_color] = 00
[notifications] =
[favourites_count] = 0
[profile_link_color] = ff
[profile_image_url] =
http://s3.amazonaws.com/twitter_production/profile_images/147264030/675753_normal.jpg
[id] = 33353324
[time_zone] =
[url] = http://dgfshfsjsj
)

[2] = Array
(
[statuses_count] = 3606
[description] = Father of 3 * Interested In * Health *
Fitness * Outdoors * Social Media * Books * Blogging * Enjoying the
spring weather
[profile_background_tile] =
[utc_offset] = -21600
[profile_text_color] = 00
[following] = 0
[profile_link_color] = ff
[profile_image_url] =
http://s3.amazonaws.com/twitter_production/profile_images/59173692/WILSON_062_normal.jpg
[profile_background_image_url] =
http://s3.amazonaws.com/twitter_production/profile_background_images/4061967/Ronnie_Wilson.jpg
[url] =
[name] = Ronnie
[profile_sidebar_fill_color] = 6E93CA
[protected] =
[screen_name] = ronniewilson
[status] = Array
(
[in_reply_to_status_id] =
[in_reply_to_user_id] =
[text] = Thanks to all who are wishing me a Happy
Sunday, I'm sure to make the best of it, Don't forget to share a smile
with someone today :)
[favorited] =
[in_reply_to_screen_name] =
[truncated] =
[id] = 1558769587
[source] = web
[created_at] = Sun Apr 19 16:21:05 + 2009
)

[time_zone] = Central Time (US  Canada)
[profile_sidebar_border_color] = C9D2BD
[followers_count] = 64755
[notifications] =
[favourites_count] = 50
[friends_count] = 68179
[location] = Kentucky
[id] = 16061242
[created_at] = Sun Aug 31 02:21:11 + 2008
[profile_background_color] = BDEDFF
)

[3] = Array
(
[description] = Manufacturing/ Product Development/
Quality Systems/ Supply Management professional seeking Renewable/
Alternative Energy employment opportunities.
[profile_background_image_url] =
http://static.twitter.com/images/themes/theme6/bg.gif
[utc_offset] = -18000