[twitter-dev] what kind of cache does twitter is using?

2009-09-01 Thread mel_06

i know the question is just a bit far from the question that should be
ask from this group but i really want to know what kind of cache does
the twitter is using?

and maybe some few explanation 'bout this kind og caching?

thanks!


[twitter-dev] Re: Delete a Direct Message

2009-09-01 Thread Praveena Sarathchandra

yes.it is a curl.
what is $handle variable?

thanks for your quick reply


On 9/1/09, Abraham Williams 4bra...@gmail.com wrote:
 How is process() making the requests? Is it with CURL?
 If so you should be able make it work by adding:
 curl_setopt($handle, CURLOPT_POST, TRUE);

 Abraham

 On Mon, Aug 31, 2009 at 21:48, Pj pravee...@gmail.com wrote:


 How to Delete a Direct message in PHP
 this is my script:

 function deleteDirectMessage($id)
{
if (!is_numeric($id)) {
return false;
}
$request = '
 http://twitter.com/direct_messages/destroy/'.$id.'.xml';


return $this-process($request);
}

 I found out that the request must be passed as a HTTP request (POST /
 DELETE) How to do this?

 thanks




 --
 Abraham Williams | Community Evangelist | http://web608.org
 Hacker | http://abrah.am | http://twitter.com/abraham
 Project | http://fireeagle.labs.poseurtech.com
 This email is: [ ] blogable [x] ask first [ ] private.
 Sent from Madison, WI, United States



-- 
Best Regards,

  Praveena J. Sarathchandra
  Freelance Web Designer/Developer

  [...@] pravee...@gmail.com
  [M] +94-77-6275266
  [W] www.ideabox.lk


[twitter-dev] Re: Delete a Direct Message

2009-09-01 Thread Abraham Williams
Look for:$handle = curl_init();

$ch is often used instead of $handle.

Make sure you add the curl_setopt() after the curl_init() and before the
curl_exec().

Abraham

On Tue, Sep 1, 2009 at 02:31, Praveena Sarathchandra pravee...@gmail.comwrote:


 yes.it is a curl.
 what is $handle variable?

 thanks for your quick reply


 On 9/1/09, Abraham Williams 4bra...@gmail.com wrote:
  How is process() making the requests? Is it with CURL?
  If so you should be able make it work by adding:
  curl_setopt($handle, CURLOPT_POST, TRUE);
 
  Abraham
 
  On Mon, Aug 31, 2009 at 21:48, Pj pravee...@gmail.com wrote:
 
 
  How to Delete a Direct message in PHP
  this is my script:
 
  function deleteDirectMessage($id)
 {
 if (!is_numeric($id)) {
 return false;
 }
 $request = '
  http://twitter.com/direct_messages/destroy/'.$id.'.xml';
 
 
 return $this-process($request);
 }
 
  I found out that the request must be passed as a HTTP request (POST /
  DELETE) How to do this?
 
  thanks
 
 
 
 
  --
  Abraham Williams | Community Evangelist | http://web608.org
  Hacker | http://abrah.am | http://twitter.com/abraham
  Project | http://fireeagle.labs.poseurtech.com
  This email is: [ ] blogable [x] ask first [ ] private.
  Sent from Madison, WI, United States
 


 --
 Best Regards,

  Praveena J. Sarathchandra
  Freelance Web Designer/Developer

  [...@] pravee...@gmail.com
  [M] +94-77-6275266
  [W] www.ideabox.lk




-- 
Abraham Williams | Community Evangelist | http://web608.org
Hacker | http://abrah.am | http://twitter.com/abraham
Project | http://fireeagle.labs.poseurtech.com
This email is: [ ] blogable [x] ask first [ ] private.
Sent from Madison, WI, United States


[twitter-dev] Re: Whitelist DM limit Question

2009-09-01 Thread jmathai

POSTs count against the authenticating user's limit and are separate
from your application's limit (whitelisted or not).  POSTs include
status updates and DMs.

On Aug 31, 9:27 pm, Matthew matthew.s.kov...@gmail.com wrote:
 I'm developing an application and I need to find out how the DM limit
 will work if I get it Whitelisted.

 Does the expanded DM limit for whitelisted applications only apply to
 DM's directly from the account associated with the application that
 has been whitelisted, or does it apply to an account that uses my
 application?

 For example if my application is linked to my account named
 MyDmAccount and a user with an account called SomeUser uses my
 application to send DMs. Can SomeUser send an increased amount of DMs
 through my application, or does the allowed increase in DMs only apply
 to DMs send directly from MyDmAccount?

 Trying to design this application to stay within the lines and need to
 figure this out before moving forward.

 Thanks,

 Matt


[twitter-dev] Re: Anyone updated jmathai OAuth library for 301s?

2009-09-01 Thread jmathai

I didn't know FOLLOWLOCATION didn't work for posts :).  Looks like the
only way to fix it is to manually follow the url in the header for
301/302s.

http://github.com/jmathai/twitter-async/issues/#issue/20

On Aug 31, 8:44 am, davidddn david.dellan...@gmail.com wrote:
 Has anyone updated the Jaisen Mathai OAuth library to support manually
 following the 301s?  Since FOLLOW_LOCATION doesn't work on POSTs, the
 library needs to be re-written in parts to manually follow the
 redirects.

 Don't want to duplicate the work if someone has done it.

 The code is here:https://github.com/jmathai/twitter-async/tree


[twitter-dev] Re: what kind of cache does twitter is using?

2009-09-01 Thread Andrew Badera

The caching they use has evolved over the past couple years. There
have been various allusions to and brief explanations of, often along
the lines of why something on the front-end is acting or looking
funky.

Starling has been mentioned several times. It works over Memcached,
and is native to Twitter:

http://highscalability.com/scaling-twitter-making-twitter-1-percent-faster

∞ Andy Badera
∞ This email is: [ ] bloggable [x] ask first [ ] private
∞ Google me: http://www.google.com/search?q=(andrew+badera)+OR+(andy+badera)



On Tue, Sep 1, 2009 at 3:12 AM, mel_06melchor...@yahoo.com wrote:

 i know the question is just a bit far from the question that should be
 ask from this group but i really want to know what kind of cache does
 the twitter is using?

 and maybe some few explanation 'bout this kind og caching?

 thanks!



[twitter-dev] Re: Problem in past 48 hours: friendships/create severe lag or loss

2009-09-01 Thread Ben Eliott


I haven't tested right through yet but issues relating to the POST/ 
auth requests from over the w/e and yesterday look largely resolved  
for me with all actions queued up and executed in the end.

Thank-you for getting onto that and sorting.
Ben


On 31 Aug 2009, at 20:07, PJB wrote:




Thanks Jon... can you let us know if past friendships/create (etc)
calls that haven't yet worked, will eventually work?  Since we
database all of these actions, we're worried that we're going to have
bad data for the past, e.g., 48 hours, unless those non-error calls
actually go through.

On Aug 31, 12:03 pm, John Kalucki jkalu...@gmail.com wrote:

We're on this. Updates from the usual sources soon.

On Aug 31, 11:57 am, David Dellanave david.dellan...@gmail.com
wrote:

I am pretty sure I am experiencing this issue as well.  I can't  
verify it,
yet.  I assumed it was an issue with OAuth, but it seems like that  
it is the

same issue.







[twitter-dev] Re: Whitelist DM limit Question

2009-09-01 Thread Matthew

So for example a user using your butler application can only broadcast
a single DM to 250 people a day. Is that correct?

Thanks,

Matt

On Sep 1, 1:01 am, Dean Collins d...@cognation.net wrote:
 if they are logging in as their account they can only send 250 Direct 
 Messages per day.

 http://help.twitter.com/forums/10713/entries/14959

 Last year, Twitter imposed reasonable limits to help prevent system and user 
 abuse.  (You can read more about that here 
 http://twitter.zendesk.com/forums/10711/entries/15364  ) If you hit a 
 Twitter limit, we will tell you by showing an error message in your browser 
 when you try to perform an action. If you've hit a limit, it means you've 
 exceeded one of these limits:

 *       1,000 updates per day

 *       250 direct messages per day

 *       150 API requests per hour

 Cheers,
 Dean Collinswww.MyTwitterButler.comhttp://www.MyTwitterButler.com  

 

 From: twitter-development-talk@googlegroups.com on behalf of Matthew
 Sent: Tue 1/09/2009 12:27 AM
 To: Twitter Development Talk
 Subject: [twitter-dev] Whitelist DM limit Question

 I'm developing an application and I need to find out how the DM limit
 will work if I get it Whitelisted.

 Does the expanded DM limit for whitelisted applications only apply to
 DM's directly from the account associated with the application that
 has been whitelisted, or does it apply to an account that uses my
 application?

 For example if my application is linked to my account named
 MyDmAccount and a user with an account called SomeUser uses my
 application to send DMs. Can SomeUser send an increased amount of DMs
 through my application, or does the allowed increase in DMs only apply
 to DMs send directly from MyDmAccount?

 Trying to design this application to stay within the lines and need to
 figure this out before moving forward.

 Thanks,

 Matt

  winmail.dat
 7KViewDownload


[twitter-dev] Re: Whitelist DM limit Question

2009-09-01 Thread Dean Collins
per account - yes.
 
but mytwitterbutler allows you to sign in with multiple accounts  :)
 
 



From: twitter-development-talk@googlegroups.com on behalf of Matthew
Sent: Tue 1/09/2009 7:55 AM
To: Twitter Development Talk
Subject: [twitter-dev] Re: Whitelist DM limit Question




So for example a user using your butler application can only broadcast
a single DM to 250 people a day. Is that correct?

Thanks,

Matt

On Sep 1, 1:01 am, Dean Collins d...@cognation.net wrote:
 if they are logging in as their account they can only send 250 Direct 
 Messages per day.

 http://help.twitter.com/forums/10713/entries/14959

 Last year, Twitter imposed reasonable limits to help prevent system and user 
 abuse.  (You can read more about that here 
 http://twitter.zendesk.com/forums/10711/entries/15364  ) If you hit a 
 Twitter limit, we will tell you by showing an error message in your browser 
 when you try to perform an action. If you've hit a limit, it means you've 
 exceeded one of these limits:

 *   1,000 updates per day

 *   250 direct messages per day

 *   150 API requests per hour

 Cheers,
 Dean Collinswww.MyTwitterButler.comhttp://www.MyTwitterButler.com 
 http://www.mytwitterbutler.com/   

 

 From: twitter-development-talk@googlegroups.com on behalf of Matthew
 Sent: Tue 1/09/2009 12:27 AM
 To: Twitter Development Talk
 Subject: [twitter-dev] Whitelist DM limit Question

 I'm developing an application and I need to find out how the DM limit
 will work if I get it Whitelisted.

 Does the expanded DM limit for whitelisted applications only apply to
 DM's directly from the account associated with the application that
 has been whitelisted, or does it apply to an account that uses my
 application?

 For example if my application is linked to my account named
 MyDmAccount and a user with an account called SomeUser uses my
 application to send DMs. Can SomeUser send an increased amount of DMs
 through my application, or does the allowed increase in DMs only apply
 to DMs send directly from MyDmAccount?

 Trying to design this application to stay within the lines and need to
 figure this out before moving forward.

 Thanks,

 Matt

  winmail.dat
 7KViewDownload


winmail.dat

[twitter-dev] An issue with the API Method: favorites and the return value Following

2009-09-01 Thread fbparis

After some tests, it seems the return value for Following after a call
to get favorites of a user is pretty bugged.

For example in the same set of results where 2 distincts favorited
statuses are from the same user, the following field can be
different  ! (one time false, one time true).

The only way to be sure the authentified user who does the favorites
query is following or not the writer of the favorited tweet would be
to use another api call and compare id with those returned by the
friends/id method ? That would be boring :(


[twitter-dev] Re: Using Twitter API by Nick Beam

2009-09-01 Thread Chris Babcock

  Andrew Badera and...@badera.us wrote:  
   TEXT AVALANCHE! RUN!  
  
 On Sep 1, 1:22 am, Chris Babcock cbabc...@kolonelpanic.org wrote:
  Paste Bin - pastebin.com - is our friend.

On Mon, 31 Aug 2009 18:49:26 -0700 (PDT)
Pj pravee...@gmail.com wrote:

 Are there any Documentation to refer to?
 
If you are going to send more than one or two lines of sample code then
using pastebin or a similar site instead of sending the code by email
can help avoid the problem of leaving a brainy mess on the keyboard for
our spouses to clean up. I think that a link to pastebin.com is a
slightly more constructive, though significantly less cathartic,
approach than shouting TEXT AVALANCHE! RUN!

As for your question... In a Tweet, docs twitter api php lib - Google
Search http://bit.ly/Ww09j  which brings us back to our punchline,
Google is your friend.

Chris Babcock



[twitter-dev] Re: Using Twitter API by Nick Beam

2009-09-01 Thread Praveena Sarathchandra
sorry guys.
Thanks a lot for your help

Best Regards,

 Praveena J. Sarathchandra
 Freelance Web Designer/Developer

 [...@] pravee...@gmail.com
 [M] +94-77-6275266
 [W] www.ideabox.lk


On Tue, Sep 1, 2009 at 7:48 PM, Chris Babcock cbabc...@kolonelpanic.orgwrote:


   Andrew Badera and...@badera.us wrote:
TEXT AVALANCHE! RUN!
  
  On Sep 1, 1:22 am, Chris Babcock cbabc...@kolonelpanic.org wrote:
   Paste Bin - pastebin.com - is our friend.

 On Mon, 31 Aug 2009 18:49:26 -0700 (PDT)
 Pj pravee...@gmail.com wrote:

  Are there any Documentation to refer to?

 If you are going to send more than one or two lines of sample code then
 using pastebin or a similar site instead of sending the code by email
 can help avoid the problem of leaving a brainy mess on the keyboard for
 our spouses to clean up. I think that a link to pastebin.com is a
 slightly more constructive, though significantly less cathartic,
 approach than shouting TEXT AVALANCHE! RUN!

 As for your question... In a Tweet, docs twitter api php lib - Google
 Search http://bit.ly/Ww09j  which brings us back to our punchline,
 Google is your friend.

 Chris Babcock




[twitter-dev] singing in to twitter with php

2009-09-01 Thread Termanater13

Im looking for a way to sign in while getting the data from
http://twitter.com/statuses/user_timeline.format (copyed frim tha
apiwiki). so I have to only set up one connection to twitter.


[twitter-dev] Redirect URL with own GET Parameters ?

2009-09-01 Thread solar22

Hello,
it is possible to do this:
My application use the follow request link:
https://twitter.com/oauth/authorize?oauth_token=MY_TOKENarticleid=%ID
it is possible that twitter redirect to page.php?id=%ID
?

thanks.


[twitter-dev] api user rate limit from different ip addresses

2009-09-01 Thread NATO24

Sorry, I couldn't find the answer in any previous thread even though
there are hundreds.

Scenario:
I create a jQuery plugin that pulls in my status updates (not
authenticated using REST).  Each person viewing my page (from
different ip addresses) hits the API once every hour.

Question:
Does this mean that only 150 people can simultaniously view that page
without hitting the rate limit?  Will it be restricted by my account
rather than by ip?

Thanks,
Nathan


[twitter-dev] Re: singing in to twitter with php

2009-09-01 Thread Peter Denton
this would work:
http://apiwiki.twitter.com/Twitter-REST-API-Method:-account%C2%A0verify_credentials

On Tue, Sep 1, 2009 at 11:08 AM, Termanater13 termana...@gmail.com wrote:


 Im looking for a way to sign in while getting the data from
 http://twitter.com/statuses/user_timeline.format (copyed frim tha
 apiwiki). so I have to only set up one connection to twitter.



[twitter-dev] Re: api user rate limit from different ip addresses

2009-09-01 Thread Jim Renkel

If the API requests come from your server when users view your page,
then, yes, your users will be collectively limited to 150
unauthenticated GET requests per hour, unless your site is white-listed.

If your site was white-listed, it would get 20,000 unauthenticated GET
requests per hour. You also authenticate the requests using multiple
accounts and get 150 (or 20,000, if white-listed) API GET requests per
hour for each account used for authentication.

If the API requests come from your users' computers, then each will get
150 API GET requests per hour.

Hope this helps.

Jim Renkel

-Original Message-
From: twitter-development-talk@googlegroups.com
[mailto:twitter-development-t...@googlegroups.com] On Behalf Of NATO24
Sent: Tuesday, September 01, 2009 12:12
To: Twitter Development Talk
Subject: [twitter-dev] api user rate limit from different ip addresses


Sorry, I couldn't find the answer in any previous thread even though
there are hundreds.

Scenario:
I create a jQuery plugin that pulls in my status updates (not
authenticated using REST).  Each person viewing my page (from
different ip addresses) hits the API once every hour.

Question:
Does this mean that only 150 people can simultaniously view that page
without hitting the rate limit?  Will it be restricted by my account
rather than by ip?

Thanks,
Nathan



[twitter-dev] Re: Redirect URL with own GET Parameters ?

2009-09-01 Thread Andrew Badera

On Tue, Sep 1, 2009 at 12:35 PM, solar22bubig...@yahoo.de wrote:

 Hello,
 it is possible to do this:
 My application use the follow request link:
 https://twitter.com/oauth/authorize?oauth_token=MY_TOKENarticleid=%ID
 it is possible that twitter redirect to page.php?id=%ID
 ?

 thanks.


Using oauth_callback you can append your own querystring value to the
callback, no problem! Just make sure you URL encode the entire
callback value.

∞ Andy Badera
∞ This email is: [ ] bloggable [x] ask first [ ] private
∞ Google me: http://www.google.com/search?q=(andrew+badera)+OR+(andy+badera)


[twitter-dev] Re: Redirect URL with own GET Parameters ?

2009-09-01 Thread Sandesh Devaraju

The way to accomplish this is by setting the articleid parameter to
the oauth_callback URL when obtaining the request token[1].

http://twitter.com/oauth/request_token?...oauth_callback=http://yourdomain.com/methodarticleid=foo;...

Note that the parameter value should be encoded as per [2] Section 5.1.

The authorization callback from Twitter would then include the
articleid as per [2] Section 6.2.3

http://yourdomain.com/methodarticleid=foooauth_token...

[1] http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-oauth-request_token
[2] http://oauth.net/core/1.0a

On Tue, Sep 1, 2009 at 12:35 PM, solar22bubig...@yahoo.de wrote:

 Hello,
 it is possible to do this:
 My application use the follow request link:
 https://twitter.com/oauth/authorize?oauth_token=MY_TOKENarticleid=%ID
 it is possible that twitter redirect to page.php?id=%ID
 ?

 thanks.



[twitter-dev] Re: api user rate limit from different ip addresses

2009-09-01 Thread Andrew Badera

On Tue, Sep 1, 2009 at 2:48 PM, Jim Renkeljames.ren...@gmail.com wrote:

 If the API requests come from your server when users view your page,
 then, yes, your users will be collectively limited to 150
 unauthenticated GET requests per hour, unless your site is white-listed.

 If your site was white-listed, it would get 20,000 unauthenticated GET
 requests per hour. You also authenticate the requests using multiple
 accounts and get 150 (or 20,000, if white-listed) API GET requests per
 hour for each account used for authentication.

 If the API requests come from your users' computers, then each will get
 150 API GET requests per hour.

jQuery should be making calls from each individual client, not the
server app  therefore, the request limit burden should be spread
out.

∞ Andy Badera
∞ This email is: [ ] bloggable [x] ask first [ ] private
∞ Google me: http://www.google.com/search?q=(andrew+badera)+OR+(andy+badera)


[twitter-dev] Re: if you will be using the Geolocation API ...

2009-09-01 Thread Jim Renkel

My understanding is that all tweets will contain geo-location
information: if the information was supplied when the tweet was created,
that will be used; if no information was supplied, then the default
location from the user's profile will be used.

I, too, have several comments and questions.

1. What if the location in a user's profile can't be geo-coded and no
geo-location is provided when creating a tweet? I would hope that no
geo-location is then provided in the tweet.

2. If it is possible to not have a geo-location attached to a tweet,
e.g., because of the circumstances above, then I suggest that there be a
parameter on the status/create method that suppresses copying the
default geo-location to the tweet.

In fact it should probably be the other way around, i.e., *DO* include
the default location, for security reasons such as those mentioned by
Lepton. I understand this will probably (significantly) reduce the
number of tweets that are geo-coded, but I think this is appropriate
given the sensitivity of the geo-location: I think users should have to
opt-in on a tweet by tweet basis to have their tweets geo-located. 

3. Will twitter be going back and geo-coding the locations given in
existing twitter accounts? If so, will it be all at once as a batch, or
the first time an old account is used to create a tweet with a
geo-location, or something else?

4. Presumably an update of an account's location will cause that new
location to be geo-coded. Will there be a delay in this, as we see with
other updates to information in twitter, or will it be instantaneous,
i.e., will the next tweet created for an account whose location is
updated be guaranteed to contain the new location's geo-code?

5. I like the idea of levels of disclosure of geo-location information,
but I don’t think this can be practically implemented.

Jim Renkel

-Original Message-
From: twitter-development-talk@googlegroups.com
[mailto:twitter-development-t...@googlegroups.com] On Behalf Of Lepton
Sent: Tuesday, September 01, 2009 08:50
To: Twitter Development Talk
Subject: [twitter-dev] Re: if you will be using the Geolocation API ...


My iPhone app ( http://myallo.com/hotlist currently waiting for Apple
approval to go into the App Store)  periodically wants to tell Twitter
the user's location. If the user is in motion, and the app is open, as
often as every 5 minutes. But it doesn't want to tweet it (I'm here,
Now I'm here, Now I'm here). That would be... bad. So I'll still
want to put it in the user profile.

There are two other things. A question and a suggestion:

Will every tweet include a location? My app is, most of the time, only
interested in seeing a friend's location and most recent last tweet.
It would be great if I could do this in one call (and greater if I
could ask about several friends at once). If a user is only putting a
location in the profile, will this location be sent along with each
tweet?

Locations have no security. It's the first, second, and third thing
every single person wants to know about my app: Who can see me, who
can I see, what about stalkers? PEople are very security oriented
when it comes to location, rightly so. Currently with Twitter I work
around this by having the app optionally post approximate coordinates.
But a level of security would be great, and I think necessary to make
geolocation successful and popular. For example take a look at
brightkite.com. They have three levels of people: The public,
friends, and trusted friends. For each of those, you can set See my
exact location, see only the city I'm in, or see nothing. That's
really useful. For Twitter, it might be relatively easy to add a flag
saying Only people I follow can see my location, and/or only followers
can see my location. And/or you could have a list of users who could
see my location.



On Aug 31, 11:44 am, Raffi Krikorian ra...@twitter.com wrote:
 part of our hopes when we designed the geolocation API is that people
 
 can start putting their profile location (user.location) back to  
 something useful (e.g. mine could say san francisco, ca) because  
 the specific location can be added as metadata to each tweet.

 what we're hoping for is that the user.location becomes something that
 
 describes the user, and not the tweet.  the geolocation API is for  
 describing the tweet.

 do you have any suggestions as to what sorts of gotcha's we should  
 look out for?




[twitter-dev] Re: Redirect URL with own GET Parameters ?

2009-09-01 Thread Andrew Badera

... you'll want to URL encode everything after oauth_callback of course.

∞ Andy Badera
∞ This email is: [ ] bloggable [x] ask first [ ] private
∞ Google me: http://www.google.com/search?q=(andrew+badera)+OR+(andy+badera)



On Tue, Sep 1, 2009 at 2:56 PM, Sandesh
Devarajusandesh.devar...@gmail.com wrote:

 The way to accomplish this is by setting the articleid parameter to
 the oauth_callback URL when obtaining the request token[1].

 http://twitter.com/oauth/request_token?...oauth_callback=http://yourdomain.com/methodarticleid=foo;...

 Note that the parameter value should be encoded as per [2] Section 5.1.

 The authorization callback from Twitter would then include the
 articleid as per [2] Section 6.2.3

 http://yourdomain.com/methodarticleid=foooauth_token...

 [1] http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-oauth-request_token
 [2] http://oauth.net/core/1.0a

 On Tue, Sep 1, 2009 at 12:35 PM, solar22bubig...@yahoo.de wrote:

 Hello,
 it is possible to do this:
 My application use the follow request link:
 https://twitter.com/oauth/authorize?oauth_token=MY_TOKENarticleid=%ID
 it is possible that twitter redirect to page.php?id=%ID
 ?

 thanks.




[twitter-dev] Re: singing in to twitter with php

2009-09-01 Thread jmathai

If you're looking to use sign in with Twitter then follow these
steps:

http://www.jaisenmathai.com/blog/2009/04/30/letting-your-users-sign-in-with-twitter-with-oauth/

On Sep 1, 11:08 am, Termanater13 termana...@gmail.com wrote:
 Im looking for a way to sign in while getting the data 
 fromhttp://twitter.com/statuses/user_timeline.format(copyed frim tha
 apiwiki). so I have to only set up one connection to twitter.


[twitter-dev] Re: Anyone updated jmathai OAuth library for 301s?

2009-09-01 Thread jmathai

I'm reconsidering adding support for POSTs.  What's the usecase
exactly?  Does Twitter 302 POST requests?  If so, what's gained by the
application if it follows that?

On Aug 31, 8:44 am, davidddn david.dellan...@gmail.com wrote:
 Has anyone updated the Jaisen Mathai OAuth library to support manually
 following the 301s?  Since FOLLOW_LOCATION doesn't work on POSTs, the
 library needs to be re-written in parts to manually follow the
 redirects.

 Don't want to duplicate the work if someone has done it.

 The code is here:https://github.com/jmathai/twitter-async/tree


[twitter-dev] Re: Anyone updated jmathai OAuth library for 301s?

2009-09-01 Thread davidddn

On Sep 1, 5:00 pm, jmathai jmat...@gmail.com wrote:
 I'm reconsidering adding support for POSTs.  What's the usecase
 exactly?  Does Twitter 302 POST requests?  If so, what's gained by the
 application if it follows that?

Unless I am mistaken Twitter is still doing the 302 on POST as a
countermeasure for their DDoS problem.

It's not that anything is gained, it's that the library doesn't work
without it.


[twitter-dev] Re: Whitelist DM limit Question

2009-09-01 Thread Dean Collins
Ok if you prefer ...
 
 
Tweetdeck has the ability to run multiple twitter accounts at the same time :)
 
 



From: twitter-development-talk@googlegroups.com on behalf of Andrew Badera
Sent: Tue 1/09/2009 8:45 AM
To: twitter-development-talk@googlegroups.com
Subject: [twitter-dev] Re: Whitelist DM limit Question




On Tue, Sep 1, 2009 at 8:28 AM, Dean Collinsd...@cognation.net wrote:
 per account - yes.

 but mytwitterbutler allows you to sign in with multiple accounts  :)

Someone liked to poke bees' nests as a kid, dinnit 'e?

? Andy Badera
? This email is: [ ] bloggable [x] ask first [ ] private
? Google me: http://www.google.com/search?q=(andrew+badera)+OR+(andy+badera)


winmail.dat

[twitter-dev] Re: if you will be using the Geolocation API ...

2009-09-01 Thread Raffi Krikorian



My understanding is that all tweets will contain geo-location
information: if the information was supplied when the tweet was  
created,

that will be used; if no information was supplied, then the default
location from the user's profile will be used.


actually - if there is no data passed in via the Geolocation API (the  
lat and long parameters on the update), then the geo object in the  
response will be empty.  the user.location is a completely separate  
entity (for now).



1. What if the location in a user's profile can't be geo-coded and no
geo-location is provided when creating a tweet? I would hope that no
geo-location is then provided in the tweet.


if a valid latitude and longitude is not provided with the tweet, then  
no geo data will be returned with the tweet.  the user, however, will  
still have his/her location as set in his/her settings page.



2. If it is possible to not have a geo-location attached to a tweet,
e.g., because of the circumstances above, then I suggest that there  
be a

parameter on the status/create method that suppresses copying the
default geo-location to the tweet.

In fact it should probably be the other way around, i.e., *DO* include
the default location, for security reasons such as those mentioned by
Lepton. I understand this will probably (significantly) reduce the
number of tweets that are geo-coded, but I think this is appropriate
given the sensitivity of the geo-location: I think users should have  
to

opt-in on a tweet by tweet basis to have their tweets geo-located.


by default, every twitter account will have access geolocation API  
turned _off_.  moreover, the only way to turn it on is for the user to  
log into twitter's web site, go to his or her's settings page, and  
then toggle access on.  if a user (or an application on behalf of the  
user) attempts to send geolocated information up to twitter along with  
the tweet, and geolocation is turned off, then the tweet will go  
through, but the geolocated information will be dropped and not stored.


hope that helps!

--
Raffi Krikorian
Twitter Platform Team
ra...@twitter.com | @raffi






[twitter-dev] Re: Stream API Count Parameter

2009-09-01 Thread Joel Strellner
That would be very nice, but at this time it looks like count is the only
way to go.

Twitter: +1 for a since_id

-Joel

On Tue, Sep 1, 2009 at 2:47 PM, Sameer sameer.kha...@gmail.com wrote:


 Hello, my question is in regards to the Stream API and how to deal
 with getting statuses when the connection was lost.  I was wondering
 if there was another way to retrieve older status messages other then
 using the count parameter? It seems using the count parameter may be
 inaccurate since estimating an average number of statuses per second
 can be flawed due to spikes or other abnormal circumstances.  Is it
 possible to pass a status_id of the last status and get all new
 statuses from that point on?  Or perhaps pass a time stamp?

 If you could help it would be greatly appreciated, it is important
 that I maintain a complete stream of status messages.



[twitter-dev] Re: Stream API Count Parameter

2009-09-01 Thread John Kalucki

The Twitter Streaming API presents statuses with Best Effort ordering
with the possibility of duplicates. It does not, and cannot
practically, order statuses. The since_id notion (a greater than
predicate) cannot reasonably be applied to an unordered column. Thus
the count parameter's weaker semantics.

Your code must deduplicate statuses to provide At Most Once semantics.
Given all the above, over requesting with the count parameter to paper
over data loss upon reconnection presents little hardship other than
some minor latency upon restart.

You could argue that the service already provides a k-sorted stream
and therefore could provide some sort of k-aware predicate filtering
based on a recent estimation of k. That wouldn't quite be since_id
though. In any case, you are left with some uncertainty and some over-
delivery and client-side deduplication.

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


On Sep 1, 3:33 pm, Joel Strellner j...@twitturly.com wrote:
 That would be very nice, but at this time it looks like count is the only
 way to go.

 Twitter: +1 for a since_id

 -Joel

 On Tue, Sep 1, 2009 at 2:47 PM, Sameer sameer.kha...@gmail.com wrote:

  Hello, my question is in regards to the Stream API and how to deal
  with getting statuses when the connection was lost.  I was wondering
  if there was another way to retrieve older status messages other then
  using the count parameter? It seems using the count parameter may be
  inaccurate since estimating an average number of statuses per second
  can be flawed due to spikes or other abnormal circumstances.  Is it
  possible to pass a status_id of the last status and get all new
  statuses from that point on?  Or perhaps pass a time stamp?

  If you could help it would be greatly appreciated, it is important
  that I maintain a complete stream of status messages.


[twitter-dev] Re: if you will be using the Geolocation API ...

2009-09-01 Thread Raffi Krikorian

hey jim.

1. the user.location is a completely separate entity (for now)  
implies

that maybe sometime in the future it may be used, e.g., to provide a
default geo-coded location for a tweet. I would suggest that if the
user's profile location if ever geo-coded, that geo-code should be  
added

to the user objects returned by API calls, at least the users/show
method. Users will want to know what may be, e.g., added to their  
tweets

without having to generate a test tweet to find out.

2. Having the user's profile location geo-coded and returned in API
calls would be very useful now. Yeh, twitter client web-sites /
applications can do it for themselves (Mine certainly will if twitter
doesn't do it.), but may come up with different / inconsistent  
results.

And, trust me, it ain't as easy to get good results as it might first
appear. To maximize use and consistency, it would be great if twitter
did the geo-coding and supplied it to everyone.


these are both great ideas.  right now, the geolocation API is really  
focused on tweet-level information -- but we're actively thinking  
about what's next.



3. Will twitter client web-sites / applications be able to turn the
geo-location feature on for their users, or do the users have to go to
twitter.com with a browser to do this? My concern here is that
twitter.com only supports two languages (English and Japanese) for its
UI, where my site (http://twxlate.com) supports these and over 40  
more.
Unless the user is fluent in English or Japanese, they won't be able  
to

turn it on. I've already run into similar problems as I'm rolling out
test versions of OAuth support.


unfortunately not.  as we're pretty sensitive to our user's privacy,  
for now, a user will have to go to twitter.com with a browser to turn  
on the setting (remember, by default it is off).  if you have any  
suggestions on how to make this user interaction better in the future,  
i would be eager to hear them!



As I've written some pretty spiffy geo-coding applications for other
purposes, I plan on doing some pretty spiffy geo-coding stuff with
twxlate.com. But it needs to be usable, or users won't use it and / or
may be annoyed by it. I would hate for that to happen to what promises
to be a really neat feature.


cool!  well - i hope what we're doing is usable!  if not, just keep  
blasting me about it.  threads like these on the mailing list are  
awesome.


--
Raffi Krikorian
Twitter Platform Team
ra...@twitter.com | @raffi






[twitter-dev] Re: Anyone updated jmathai OAuth library for 301s?

2009-09-01 Thread davidddn

On Sep 1, 6:41 pm, jmathai jmat...@gmail.com wrote:
 That's a valid point.  What do you think of following on GETs and
 throwing an exception for POSTs?  Not sure many people like to deal
 with exceptions (I prefer them).

It would be helpful if someone from Twitter or who has done some
extensive testing of the 302 behavior could chime in.

IF re-trying the request after NOT following a 302 on a POST doesn't
bypass the DDoS countermeasure than throwing an exception is
completely useless.  IF re-trying the request after encountering a 302
DOES work, than throwing an exception would be sufficient to solve the
problem.

Personally I'd rather just see the library follow the 301/302 on POST
and GET, but I can see where throwing an exception would be the more
compliant approach.

Can someone chime in on this please?


[twitter-dev] Re: Anyone updated jmathai OAuth library for 301s?

2009-09-01 Thread fbparis

I've just coded this function which may help :

function redirect_post($url,$data) {
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
curl_setopt($ch, CURLOPT_HEADER, true);

curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);

list($header,$content) = preg_split(#(\r)?\n(\r)?\n#s,curl_exec
($ch),2);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);

curl_close($ch);

if (in_array($http_code,array(301,302))) {
$redir = preg_match(#Location:(.*?)\n#si,$header,$m) ? trim($m
[1]) : '';
if ($redir  ($redir != $url)) return 
redirect_post($redir,$data);
}

return $content;
}

I've tested, it's ok ; and shouldn't be so hard to use in the lib.

I'll have to use the Jaisen Mathai OAuth library very soon too, so if
no solution has been found I'll post mine here :)

FB


[twitter-dev] Re: Website!

2009-09-01 Thread chepe263

Start with simple code. I'm using php and the Rest Api from twitter.
At the moment i can put my friends_timeline on a php page and
compare username and passwords to make a login.

see ya!!
(era mas para presumir que para ayudar jeje)
chepe263


[twitter-dev] Can't enter full name, character limit

2009-09-01 Thread Martin Klein Schaarsberg

Hello,

Under Twitter / Settings I've tried to enter my full name, Martin
Klein Schaarsberg, but I can only enter Martin Klein Schaars.

Is there a possibility to enter my full name or can the problem be
fixed? The character limit is quite low in my opinion. There are quite
a lot of people with longer names.

Best regards,

Martin Klein Schaarsberg


[twitter-dev] Re: Anyone updated jmathai OAuth library for 301s?

2009-09-01 Thread jmathai

One the issues is that the twitter-sync library utilizes multicurl
which allows for parallel requests.  Introducing this type of logic is
tricky since the library allows you to access the results later and
only at that point can we inspect the headers.  Most people probably
use it in a manner where they immediately block for the results, but I
don't think sacrificing the ability to do parallel requests is worth
following 302s.

Anyways, I'd like to know from Twitter what their plans are for the
302 redirects.  Is it temporary?  It's far from an ideal solution and
seems more like a stop gap.  However, I don't think they'll chime in
on this thread due to the title.  Perhaps a new general thread would
be appropriate.

Jaisen

On Sep 1, 7:06 pm, fbparis fbou...@gmail.com wrote:
 I've just coded this function which may help :

 function redirect_post($url,$data) {
         $ch = curl_init($url);
         curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 2);
         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
         curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
         curl_setopt($ch, CURLOPT_HEADER, true);

         curl_setopt($ch, CURLOPT_POST, 1);
         curl_setopt($ch, CURLOPT_POSTFIELDS, $data);

         list($header,$content) = preg_split(#(\r)?\n(\r)?\n#s,curl_exec
 ($ch),2);
         $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);

         curl_close($ch);

         if (in_array($http_code,array(301,302))) {
                 $redir = preg_match(#Location:(.*?)\n#si,$header,$m) ? 
 trim($m
 [1]) : '';
                 if ($redir  ($redir != $url)) return 
 redirect_post($redir,$data);
         }

         return $content;

 }

 I've tested, it's ok ; and shouldn't be so hard to use in the lib.

 I'll have to use the Jaisen Mathai OAuth library very soon too, so if
 no solution has been found I'll post mine here :)

 FB


[twitter-dev] Re: is this steet legal??

2009-09-01 Thread jmathai
Why wouldn't this be legal?

On Sep 1, 7:22 pm, clearmedia ch...@clearmedia.com.au wrote:
 Hi everyone,

 Just wanting to know if this function is ok to connect and pull down
 twitter statuses. It works by the way!

 ?php
 function get_twitter_feed($screen_name){
                         $xml=new DOMDocument();
                         
 $xml-load(http://twitter.com/statuses/user_timeline.xml?
 screen_name=.$screen_name);

                         $status_array=$xml-getElementsByTagName(statuses);

                         foreach($status_array as $status_array){

                                 
 $status_list=$status_array-getElementsByTagName(status);

                                 foreach($status_list as $status){

                                         
 $date_node=$status-getElementsByTagName(created_at);
                                         
 $text_node=$status-getElementsByTagName(text);

                                         $i=0;

                                         foreach($date_node as $date_node){

                                                 
 $date=$date_node-firstChild-nodeValue;

                                                 $date=substr($date, 0, 10);

                                                 $i++;

                                                 if($i==1){
                                                 print $date.br /;
                                                 }

                                         }

                                         foreach($text_node as $text_node){

                                                 
 $text=$text_node-firstChild-nodeValue;
                                                 print $text.br /br /;

                                         }

                                 }

                         }
                         }
 ?

[twitter-dev] Re: is this steet legal??

2009-09-01 Thread clearmedia

not sure. I'm not using any authorization etc...?