[twitter-dev] Re: statuses/update and quotes

2010-03-05 Thread ByronR
Just had the same issue. Could be magic_quotes (PHP), try
stripslashes.
$status = stripslashes($status);

On Feb 15, 8:22 am, Fred Garvin  wrote:
> I am still really struggling with this, I have searched everywhere and
> no matter what code I use I end up with a post that has escapedquotes, here 
> is a sample:
>
> Lets see if we fixed the issue with \"quotes\", even when they are
> \'single\'quotes, nope no luck yet...
>
> What format will twitter accept single and doublequotesin? I imagine
> I need to do some type of string replace, but have no idea what to
> replace with.
>
> Here is when I am at now:
>
> $status = htmlspecialchars($status, ENT_QUOTES, 'UTF-8');
>
> Any help would really be appreciated.
>
> Thanks.


[twitter-dev] Re: Follow me on Twitter

2010-03-05 Thread Jaanus
There are many ways, though, to implement the OAuth interface to sign
in the user. Many sites (see getsatisfaction.com for an example) do it
with a popup instead of a full page reload. This means that the main
page stays whatever it is, and the Twitter stuff appears just in a
small popup.


rgds,
Jaanus


On Mar 5, 6:30 pm, AlexBeck  wrote:
> Thanks all,
>
> this is what i feared.
> On Mar 3, 3:34 pm, Jaanus  wrote:
>
>
>
> > Twitter API lets youfollowand unfollow people. But, the user needs
> > to login, and these days the fancy way to do login is through OAuth,
> > which means a trip to twitter.com anyway.
>
> > On Mar 2, 9:58 pm, AlexBeck  wrote:
>
> > > I am creating a project for a rather large client, and have run into a
> > > twitter api question.  The client wants to create a "followmeon
> > > twitter" bug on the page, but they do not want to land on any page
> > > that is a twitter.com address?
>
> > > is it possible to create an experience in a browser where someone can
> > > choose tofollowanother twitter user without every going to the
> > > twitter site?
>
> > > thanks
> > > alex


Re: [twitter-dev] Re: Deprecating /statuses/public_timeline resource on 4/5/10

2010-03-05 Thread Raffi Krikorian
hi all.

i just wanted to let you know that we've heard all the issues around this
deprecation and potential removal of public_statuses -- we're currently
reviewing and thinking this over and will have more to say next week.

thanks for your patience.

fixed.
>
> BTW, it doesn't look like the docs on the apiwiki have been updated
>> with the deprecation notice.
>>
>
-- 
Raffi Krikorian
Twitter Platform Team
http://twitter.com/raffi


[twitter-dev] Re: Introduce yourself!

2010-03-05 Thread Pistachio
OK awesome x3 - 1) GREAT about the funding!! 2) i didn't know you were
working on a Twitter app and 3) i'll see you at Chirp!!

When you get a chance, please definitely pop the deets about ThinkTank
into http://oneforty.com so we can help it get found - this is *my*
startup that i was just teensy tiny embryo incubating when I met you
last spring at FOO. We'd also love to collect Abraham's & any other
libraries you've found useful (just use "Suggest App). Last I checked
there were only 4 things tagged API Library, Net::Twitter among them,
even though we're tracking more than 2500 apps.

(Boy have I gotten to learn a LOT about software since I saw you
last. :-) )

We're hosting Twitter API developer parties at SXSW (tweetvite.com/
event/beeroclock) & the night before Chirp (TBD)

Hope you are well & hope I see you soon

Warmly,
Laura Fitton (aka @Pistachio)
(who really needs to update her list membership to be from
la...@oneforty.com!!!)

Laura Fitton
CEO/Founder, oneforty inc.
la...@oneforty.com
617-838-2456

On Feb 22, 6:40 pm, Gina Trapani  wrote:
> Hi list,
>
> I'm @ginatrapani, and I'm working on ThinkTank (http://
> thinktankapp.com), an install-it-yourself webapp that archives your
> tweets, friends, followers, and mentions and makes curating/filtering
> tweet replies easier. (It also makes use of Abraham's TwitterOAuth
> library, so THANK YOU kind sir.) It started as a weekend project, but
> I just got funding by Expert Labs, a non-profit that makes tech for
> helping government use social media more effectively--so now it's my
> full-time job. In April, the White House will use ThinkTank for their
> Grand Challenges project. In short, they'll use Twitter and other
> services + ThinkTank to gather and curate public feedback about what
> should be our top-priority scientific and technology challenges.
> Exciting stuff.
>
> ThinkTank's source code is here:http://github.com/ginatrapani/thinktank
>
> Here's more about ThinkTank and Expert 
> Labs:http://smarterware.org/5187/thinktank-is-now-at-expert-labs
>
> My top API wishlist item is retrieving all the replies to a given
> tweet.
>
> I'm also planning to come to Chirp, and hope to meet you all there.
>
> Best,
> Gina
>
> On Feb 19, 12:20 pm, Abraham Williams <4bra...@gmail.com> wrote:
>
>
>
> > We have not had an introductions thread in a long time (or ever that I could
> > find) so I'm starting one. Don't forget to add an answer to the tools thread
> > [1](Gmail link [2]) as well.
>
> > I'm Abraham Williams, I've been working with the Twitter API and this group
> > since early 2008. I do mostly freelance Drupal and Twitter API integration
> > and personal projects. I love seeing the creative projects developers build
> > or integrate with the API and look forward to meeting many of you at Chirp.
>
> > TwitterOAuth [3] the first PHP library to support OAuth is built and
> > maintained by me, and will hopefully see a new release soon. I also built a
> > fun Chrome extension [4] that integrates common friends and followers into
> > Twitter profiles.
>
> > The feature I would most like added to the API is a conversation method to
> > get replies to a specific status.
>
> > So. Who are you, what do you do, what have you built, and what feature do
> > you most want to see added?
>
> > @Abraham
>
> > [1]http://groups.google.com/group/twitter-development-talk/browse_thread...
> > [2]https://mail.google.com/mail/#inbox/12680cd0fa59011e
> > [3]https://chrome.google.com/extensions/detail/npdjhmblakdjfnnajeomfbogo...
> > [4]http://code.google.com/p/twitter-api/issues/detail?id=142
>
> > --
> > Abraham Williams | Community Advocate |http://abrah.am
> > Project | Out Loud |http://outloud.labs.poseurtech.com
> > This email is: [ ] shareable [x] ask first [ ] private.
> > Sent from Seattle, WA, United States


Re: [twitter-dev] search api problem

2010-03-05 Thread Abraham Williams
Have a look at the Streaming API. [1] You can open a connection and count
through every thousand results.

Abraham

[1] http://apiwiki.twitter.com/Streaming-API-Documentation

On Mon, Mar 1, 2010 at 04:17, enes akar  wrote:

> Hello;
> I want to find when the publish time of 1000th tweet that contains word
> 'love'. So I make the following query.
>
> http://search.twitter.com/search.atom?rpp=1&page=1000&q=love
>
> But the results are instable.
> Sometimes, the result is the tweet that is just 10 minutes ago from now.
> (this result is logical)
> Sometimes, the result is the tweet that is 7-8 hours ago from now. (this is
> not logical)
>
> I tried to use max_id to fix the results.
> But again for different max_id, the interval between published_time are
> very instable.
>
> Are not the search results ordered by published time?
>
> Extra note, I see this problem only the words with heavy usage like 'love',
> 'yes'.
> Search queries for specisific searches are stable and logical.
>
> --
> Enes Akar
> http://www.linkedin.com/pub/enes-akar/7/835/3aa
>



-- 
Abraham Williams | Community Advocate | http://abrah.am
TwitterOAuth | http://github.com/abraham/twitteroauth
This email is: [ ] shareable [x] ask first [ ] private.


Re: [twitter-dev] Bad ID - suspended - banned

2010-03-05 Thread Abraham Williams
Could be a banned user or could be a deleted user. The text should change to
reflect the response.


> 404 Not Found: The URI requested is invalid or the resource requested, such
> as a user, does not exists.


http://apiwiki.twitter.com/HTTP-Response-Codes-and-Errors

Abraham

On Tue, Mar 2, 2010 at 19:02, EastSideDev  wrote:

> If I get an HTTP response 404 (users/show for example), will I always
> get the same error code ['error']='Bad ID'? or are there different
> codes to tell me if this user has been suspended, banned, etc.?
>



-- 
Abraham Williams | Community Advocate | http://abrah.am
TwitterOAuth | http://github.com/abraham/twitteroauth
This email is: [ ] shareable [x] ask first [ ] private.


Re: [twitter-dev] What is limit for receiving direct messages?

2010-03-05 Thread Abraham Williams
I've never heard of anyone running into a limit of received direct messages.

Abraham

On Wed, Mar 3, 2010 at 09:44, Ramanean  wrote:

>
> What is the limit for receiving direct messages?
>
> Whether I would be able to receive more than 250 direct messages ??
> from different users?
>
> Thanks
> Shan
>



-- 
Abraham Williams | Community Advocate | http://abrah.am
TwitterOAuth | http://github.com/abraham/twitteroauth
This email is: [ ] shareable [x] ask first [ ] private.


[twitter-dev] Re: Follow me on Twitter

2010-03-05 Thread AlexBeck
Thanks all,

this is what i feared.
On Mar 3, 3:34 pm, Jaanus  wrote:
> Twitter API lets youfollowand unfollow people. But, the user needs
> to login, and these days the fancy way to do login is through OAuth,
> which means a trip to twitter.com anyway.
>
> On Mar 2, 9:58 pm, AlexBeck  wrote:
>
>
>
> > I am creating a project for a rather large client, and have run into a
> > twitter api question.  The client wants to create a "followmeon
> > twitter" bug on the page, but they do not want to land on any page
> > that is a twitter.com address?
>
> > is it possible to create an experience in a browser where someone can
> > choose tofollowanother twitter user without every going to the
> > twitter site?
>
> > thanks
> > alex


Re: [twitter-dev] What's the time to get xAuth request reviewed?

2010-03-05 Thread Anton Krasovsky
Yep, I am. Thanks guys!

Anton

On Fri, Mar 5, 2010 at 9:31 PM, Mark McBride  wrote:
> Just to follow up on this, I think Anton is taken care of.
>   ---Mark
>
> http://twitter.com/mccv
>
>
> On Thu, Mar 4, 2010 at 2:46 AM, Anton Krasovsky 
> wrote:
>>
>> Hi Raffi,
>>
>> I wonder what's the approx time to get xAuth request reviewed? I've
>> submitted mine good two weeks ago (#866246) and haven't heard of it
>> since?
>> I don't mind waiting, but I wonder if it might have fallen through the
>> cracks somehow.
>>
>> Regards,
>> Anton
>
>


Re: [twitter-dev] Re: Need help with the streaming API syntax....specifically how to point to the track text file without using curl

2010-03-05 Thread Mark McBride
Let me clarify... You can do one of

1) Use GET, and specify the parameters as part of the URL query string
(e.g. 
"http://stream.twitter.com/1/statuses/filter.json?track=Microsoft
")
2) Use POST, and pass your arguments in through some VB method.  In this
case the URL will be
"http://stream.twitter.com/1/statuses/filter.json
"

  ---Mark

http://twitter.com/mccv


On Fri, Mar 5, 2010 at 2:55 PM, Mad Euchre  wrote:

> I switch to post after reading John's response.
>
> When creating an HTTP client from within a program, you should be able
> to
> configure the POST parameters via method calls. If you can't, it's a
> pretty
> worthless HTTP library. Each client library is different, check your
> docs.
>
> -John Kalucki
>
> On Mar 5, 4:38 pm, Mark McBride  wrote:
> > I think this is slightly backwards.  You want to use the GET method, but
> set
> > up the URI you have (with the track=Microsoft parameter).  You will also
> > need to authenticate.
> >
> > Note that this is a streaming API.  I don't know VB all that well, but
> > there's a reasonable chance that this call only returns data when the
> HTTP
> > call has finished.  The streaming API will *never* finish, so you'll need
> to
> > parse data as it's available.  Without looking at VB doc I have no idea
> how
> > you would set that up.
> >
> >   ---Mark
> >
> > http://twitter.com/mccv
> >
> >
> >
> > On Fri, Mar 5, 2010 at 9:54 AM, Mad Euchre 
> wrote:
> > > Thanks.
> >
> > > Now I'm using the post method.
> >
> > > How should I use the track parameter? Something like this?
> >
> > >  address = New Uri("http://stream.twitter.com/1/statuses/filter.json?
> > > track=Microsoft")
> >
> > > I'm getting connected but no data  that matches Microsoft is streaming
> > > over.No data for that matter.
> >
> > > I'm passing my name and pw in the request.credentials method. The
> > > server returned a 200 OK when I added the credentials but not when it
> > > was in the URL alone.
> >
> > > ie; address = New Uri("http://stream.twitter.com/1/statuses/
> > > filter.json?track=Microsoft - name:pw"
> >
> > > Thanks,
> >
> > > Peter
> >
> > > On Mar 2, 5:19 pm, John Kalucki  wrote:
> > > > The text file approach only applies to POST parameters set from the
> curl
> > > > command, and in no other case.
> >
> > > > When creating an HTTP client from within a program, you should be
> able to
> > > > configure the POST parameters via method calls. If you can't, it's a
> > > pretty
> > > > worthless HTTP library. Each client library is different, check your
> > > docs.
> >
> > > > -John Kaluckihttp://twitter.com/jkalucki
> > > > Infrastructure, Twitter Inc.
> >
> > > > On Tue, Mar 2, 2010 at 12:42 PM, Mad Euchre  >
> > > wrote:
> > > > > This is the VB code I would use to start any http stream
> >
> > > > >request = DirectCast(WebRequest.Create("http://
> > > > > stream.twitter.com/1/statuses/filter.json - name:pw"),
> HttpWebRequest)
> > > > >request.Credentials = New NetworkCredential("name",
> "pw")
> > > > >' Get response
> > > > >response = DirectCast(request.GetResponse(),
> > > > > HttpWebResponse)
> >
> > > > >' Get the response stream into a reader
> > > > >reader = New StreamReader(response.GetResponseStream())
> >
> > > > > The streaming api documentation says to create a file called
> track.txt
> > > > > and add text similar to this without the quotes.   "track=peter,
> paul,
> > > > > mary"
> >
> > > > > Then use curl @track.txthttp://
> > > stream.twitter.com/1/statuses/filter.json
> > > > > - name:pw
> >
> > > > > I can't believe I have to shell out to DOS and run the curl command
> > > > > line.
> >
> > > > > My direct question is how do others incorportate the @track.txt in
> the
> > > > > VB.Net web request?
> >
> > > > > Maybe something like this?
> >
> > > > >http://stream.twitter.com/1/statuses/filter.json-name:pw?
> > > > > track.txt
> >
> > > > > Thanks- Hide quoted text -
> >
> > > > - Show quoted text -- Hide quoted text -
> >
> > - Show quoted text -
>


[twitter-dev] Re: Need help with the streaming API syntax....specifically how to point to the track text file without using curl

2010-03-05 Thread Mad Euchre
I switch to post after reading John's response.

When creating an HTTP client from within a program, you should be able
to
configure the POST parameters via method calls. If you can't, it's a
pretty
worthless HTTP library. Each client library is different, check your
docs.

-John Kalucki

On Mar 5, 4:38 pm, Mark McBride  wrote:
> I think this is slightly backwards.  You want to use the GET method, but set
> up the URI you have (with the track=Microsoft parameter).  You will also
> need to authenticate.
>
> Note that this is a streaming API.  I don't know VB all that well, but
> there's a reasonable chance that this call only returns data when the HTTP
> call has finished.  The streaming API will *never* finish, so you'll need to
> parse data as it's available.  Without looking at VB doc I have no idea how
> you would set that up.
>
>   ---Mark
>
> http://twitter.com/mccv
>
>
>
> On Fri, Mar 5, 2010 at 9:54 AM, Mad Euchre  wrote:
> > Thanks.
>
> > Now I'm using the post method.
>
> > How should I use the track parameter? Something like this?
>
> >  address = New Uri("http://stream.twitter.com/1/statuses/filter.json?
> > track=Microsoft")
>
> > I'm getting connected but no data  that matches Microsoft is streaming
> > over.No data for that matter.
>
> > I'm passing my name and pw in the request.credentials method. The
> > server returned a 200 OK when I added the credentials but not when it
> > was in the URL alone.
>
> > ie; address = New Uri("http://stream.twitter.com/1/statuses/
> > filter.json?track=Microsoft - name:pw"
>
> > Thanks,
>
> > Peter
>
> > On Mar 2, 5:19 pm, John Kalucki  wrote:
> > > The text file approach only applies to POST parameters set from the curl
> > > command, and in no other case.
>
> > > When creating an HTTP client from within a program, you should be able to
> > > configure the POST parameters via method calls. If you can't, it's a
> > pretty
> > > worthless HTTP library. Each client library is different, check your
> > docs.
>
> > > -John Kaluckihttp://twitter.com/jkalucki
> > > Infrastructure, Twitter Inc.
>
> > > On Tue, Mar 2, 2010 at 12:42 PM, Mad Euchre 
> > wrote:
> > > > This is the VB code I would use to start any http stream
>
> > > >            request = DirectCast(WebRequest.Create("http://
> > > > stream.twitter.com/1/statuses/filter.json - name:pw"), HttpWebRequest)
> > > >            request.Credentials = New NetworkCredential("name", "pw")
> > > >            ' Get response
> > > >            response = DirectCast(request.GetResponse(),
> > > > HttpWebResponse)
>
> > > >            ' Get the response stream into a reader
> > > >            reader = New StreamReader(response.GetResponseStream())
>
> > > > The streaming api documentation says to create a file called track.txt
> > > > and add text similar to this without the quotes.   "track=peter, paul,
> > > > mary"
>
> > > > Then use curl @track.txthttp://
> > stream.twitter.com/1/statuses/filter.json
> > > > - name:pw
>
> > > > I can't believe I have to shell out to DOS and run the curl command
> > > > line.
>
> > > > My direct question is how do others incorportate the @track.txt in the
> > > > VB.Net web request?
>
> > > > Maybe something like this?
>
> > > >http://stream.twitter.com/1/statuses/filter.json-name:pw?
> > > > track.txt
>
> > > > Thanks- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -


Re: [twitter-dev] Can't access old tweets via statuses/user_timeline

2010-03-05 Thread M. Edward (Ed) Borasky

Quoting Mark McBride :


Currently we only support retrieval of the last N tweets, where N is 3200 if
I recall.


It is a maximum of 3200 of the user's *original* tweets. If, for  
example, you retrieve tweets in pages of 200 tweets, you will get a  
maximum of 16 pages. And only tweets that originated from the user  
will be in those pages. If you're one of those people, like me, who  
use the built-in retweet capability heavily, those retweets *won't* be  
in what you get back, but they count against you as part of the 3200.  
;-)


--
M. Edward (Ed) Borasky
borasky-research.net/m-edward-ed-borasky/

"A mathematician is a device for turning coffee into theorems." ~ Paul Erd?s



  ---Mark

http://twitter.com/mccv


On Wed, Mar 3, 2010 at 3:26 PM, @seiz  wrote:


Hi,

I am Trying to backup all my tweets (for @seiz) but it seems tweets of
a certain age aren't accessible via the api (the oldest tweet i get is
ID 1226937920 from 02/2009).
I am even using since_id and max_id restrictions in the API call in
order to avoid hitting a pagination limit and still can't get any very
old tweets.
Same goes for mentions (and i guess everything else like DMs too).

How can i get all my tweets in order to back them up?
Note, i basically have to do this only once and then only get a daily/
weekly or whatever delta using since_id, so it should not put too much
load on the api.

PS: there's also a BUG. when using max_id in the api call, the result
will include tweets where ID==max_id which, according to the
documentation should not be the case and only every thweet with an id
between since_id and < max_id (but not including max_id) should be
returned.

(I filed a ticket on help.twitter, but am also posting here, as past
experience seemed to indicate, that the ticketing system is not
maintained – sorry for the cross posting)

Thanks
Stefan







Re: [twitter-dev] Re: Location Data From Stream API

2010-03-05 Thread M. Edward (Ed) Borasky

Quoting GeorgeMedia :


Well I have Lon/lat data for all (not just major, all) US ans CA
cities so converting the location name to Lon/lat data is somehing I
can do in house. I can even do my own radius calculations no sweat. I
just am having trouble determining how I go about filtering out the
garbage in the location field and finding actual usable city/state
info.

Knowing how Twitter does it sure would help!


I've actually filed a defect on "How Twitter does it" ;-) "fart_robot"
from "Botland" shows up in Twitter Searches for PDX. ;-)

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

I've also seen people from the UK and Australia show up in PDX searches.

Well ... "Botland" sorta sounds like Portland, right? ;-)
--
M. Edward (Ed) Borasky
borasky-research.net/m-edward-ed-borasky/

"A mathematician is a device for turning coffee into theorems." ~ Paul Erdos


Re: [twitter-dev] Re: xAuth

2010-03-05 Thread Taylor Singletary
Hi Berto,

I can confirm that using POST operations over HTTPs will work for XAuth.

Your URL should only contain: https://api.twitter.com/oauth/access_token

Your signature base string should contain the x_auth_* parameters.

Your authorization string should not contain the x_auth_* parameters.

Here's a replay of a successful request:

Full Request URI:
https://api.twitter.com/oauth/access_token

Signature Base String:
POST&https%3A%2F%2Fapi.twitter.com
%2Foauth%2Faccess_token&oauth_consumer_key%3Dri8JxxxdwSV5xIUfNNvQ%26oauth_nonce%3DNI14r4hzKMlslKakhjeOaHoIeWw53ZMeTJb4zAaZh2o%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1267826670%26oauth_version%3D1.0%26x_auth_mode%3Dclient_auth%26x_auth_password%Dxxx%26x_auth_username%3De

Example response:
oauth_token=1234-torCkTs0XK7H2Y2i1ee5iofXyzp7aayeEXRTmlw&oauth_token_secret=Xyz0gOZHNQKPooBiWCZRY81klwS3kLZGa2wc&user_id=1234&screen_name=e&x_auth_expires=0

Keep in mind that your signing secret will not include an
oauth_token_secret, so will be the equivalent of "{consumer_secret}&"

Taylor

On Fri, Mar 5, 2010 at 12:09 PM, Berto  wrote:

> Three days and I still can't get this to work.  I even tried switching
> over to GET instead of POST and it tells me "Failed to validate oauth
> signature and token".  This is fully functional for regular oauth.
> Signature Base String is:
>
> Signature Base String: Signature Base String:
> GET&https%3A%2F%2Fapi.twitter.com%2Foauth
> %2Faccess_token&oauth_consumer_key%3D%26oauth_nonce
> %3D1267819560%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp
> %3D1267819217%26oauth_version%3D1.0%26x_auth_mode%3Dclient_auth
> %26x_auth_password%3D%26x_auth_username%3D
>
> I'm sending oauth parameters via the Authorization header and the
> three xAuth parameters as GET parameters (?
> x_auth_username=&x_auth_pass=&x_auth_mode=client_auth).
>
> It appears as though everyone who had oauth working before had an easy
> transition so I'm just a little curious why mine isn't working when I
> literally have only changed the URL and three parameters.  I've
> verified this is going over SSL as well.
>
> Any help is appreciated.
>
> Thanks.
> On Mar 4, 3:34 pm, Anton Krasovsky  wrote:
> > In case if anyone's interested (though I doubt there are many
> > Erlang'ers on the list),
> > I just addedxAuthsupport to twerl.
> >
> > http://github.com/ak1394/twerl
> >
> > Regards,
> > Anton
> >
> > On Wed, Mar 3, 2010 at 4:57 PM, Berto  wrote:
> > > Raffi,
> >
> > > Can you comment on the first part of Marc's last reply?
> >
> > > Thanks!
> >
> > > On Mar 3, 9:24 am, Marc Mims  wrote:
> > >> * Berto  [100303 06:42]:
> >
> > >> > Isn't that using a GET request versus the docs saying POST?  And I
> > >> > thought parameters were supposed to be normalized except for
> signature
> > >> > which gets attached at the end?
> >
> > >> Hmmm. I completely missed the fact that the documentation specifies
> > >> POST.  I used GET and it worked.  When I use a POST, I get a 401.
> >
> > >> Doc bug?
> >
> > >> The order you *send* the parameters doesn't matter---the order of the
> > >> base string used for generating the signature does.
> >
> > >> The underlying libraries I use assemble the parameters in an arbitrary
> > >> order.  Generation of the signature is a separate call and builds it's
> > >> own base string from a hash (associative array).
> >
> > >> @semifor
>


[twitter-dev] Re: Location Data From Stream API

2010-03-05 Thread GeorgeMedia
Well I have Lon/lat data for all (not just major, all) US ans CA
cities so converting the location name to Lon/lat data is somehing I
can do in house. I can even do my own radius calculations no sweat. I
just am having trouble determining how I go about filtering out the
garbage in the location field and finding actual usable city/state
info.

Knowing how Twitter does it sure would help!

I wonder if they are using IP location info in their determination...

On Mar 5, 3:51 pm, "M. Edward (Ed) Borasky"  wrote:
> Quoting Mark McBride :
>
> > Parsing the location field is probably your best bet, but I'd say you have a
> > challenging road ahead.  It is indeed a mess, but there are geocoding
> > solutions available to try and sort this stuff out.
>
> Be *very* careful with "geocoding solutions", especially taking note  
> of the terms of service and licensing constraints. Google, Yahoo and  
> Microsoft all have restrictions on what you can do with their tools.  
> There are some open source / "free as in freedom" tools too, but they  
> may be more limited.
>
> I've spent a number of hours recently working with various open source  
> projects associated with mapping earthquake and other disaster zones,  
> and this is a constant source of frustration. I'm guessing it would be  
> even more a source of frustration if you're building marketing / sales  
> tools rather than non-profit ones. People trapped in the rubble of a  
> collapsed build usually *want* to be found; people sitting in a  
> restaurant having a glass of wine with some friends might not. ;-)
>
> --
> M. Edward (Ed) Borasky
> borasky-research.net/m-edward-ed-borasky/
>
> "A mathematician is a device for turning coffee into theorems." ~ Paul Erdos


Re: [twitter-dev] Location Data From Stream API

2010-03-05 Thread M. Edward (Ed) Borasky

Quoting Mark McBride :


Parsing the location field is probably your best bet, but I'd say you have a
challenging road ahead.  It is indeed a mess, but there are geocoding
solutions available to try and sort this stuff out.


Be *very* careful with "geocoding solutions", especially taking note  
of the terms of service and licensing constraints. Google, Yahoo and  
Microsoft all have restrictions on what you can do with their tools.  
There are some open source / "free as in freedom" tools too, but they  
may be more limited.


I've spent a number of hours recently working with various open source  
projects associated with mapping earthquake and other disaster zones,  
and this is a constant source of frustration. I'm guessing it would be  
even more a source of frustration if you're building marketing / sales  
tools rather than non-profit ones. People trapped in the rubble of a  
collapsed build usually *want* to be found; people sitting in a  
restaurant having a glass of wine with some friends might not. ;-)


--
M. Edward (Ed) Borasky
borasky-research.net/m-edward-ed-borasky/

"A mathematician is a device for turning coffee into theorems." ~ Paul Erdos



Re: [twitter-dev] Re: Need help with the streaming API syntax....specifically how to point to the track text file without using curl

2010-03-05 Thread Andrew Badera
You need a client returning incremental HTTP responses. I don't think
WebResponse does that. TcpClient definitely does, that's what I'm
using in C#.

∞ Andy Badera
∞ +1 518-641-1280 Google Voice
∞ This email is: [ ] bloggable [x] ask first [ ] private
∞ Google me: http://www.google.com/search?q=andrew%20badera



On Fri, Mar 5, 2010 at 4:38 PM, Mark McBride  wrote:
> I think this is slightly backwards.  You want to use the GET method, but set
> up the URI you have (with the track=Microsoft parameter).  You will also
> need to authenticate.
> Note that this is a streaming API.  I don't know VB all that well, but
> there's a reasonable chance that this call only returns data when the HTTP
> call has finished.  The streaming API will *never* finish, so you'll need to
> parse data as it's available.  Without looking at VB doc I have no idea how
> you would set that up.
>
>   ---Mark
>
> http://twitter.com/mccv
>
>
> On Fri, Mar 5, 2010 at 9:54 AM, Mad Euchre  wrote:
>>
>> Thanks.
>>
>> Now I'm using the post method.
>>
>> How should I use the track parameter? Something like this?
>>
>>  address = New Uri("http://stream.twitter.com/1/statuses/filter.json?
>> track=Microsoft")
>>
>> I'm getting connected but no data  that matches Microsoft is streaming
>> over.No data for that matter.
>>
>> I'm passing my name and pw in the request.credentials method. The
>> server returned a 200 OK when I added the credentials but not when it
>> was in the URL alone.
>>
>> ie; address = New Uri("http://stream.twitter.com/1/statuses/
>> filter.json?track=Microsoft - name:pw"
>>
>> Thanks,
>>
>> Peter
>>
>>
>>
>>
>>
>>
>>
>>
>> On Mar 2, 5:19 pm, John Kalucki  wrote:
>> > The text file approach only applies to POST parameters set from the curl
>> > command, and in no other case.
>> >
>> > When creating an HTTP client from within a program, you should be able
>> > to
>> > configure the POST parameters via method calls. If you can't, it's a
>> > pretty
>> > worthless HTTP library. Each client library is different, check your
>> > docs.
>> >
>> > -John Kaluckihttp://twitter.com/jkalucki
>> > Infrastructure, Twitter Inc.
>> >
>> >
>> >
>> > On Tue, Mar 2, 2010 at 12:42 PM, Mad Euchre 
>> > wrote:
>> > > This is the VB code I would use to start any http stream
>> >
>> > >            request = DirectCast(WebRequest.Create("http://
>> > > stream.twitter.com/1/statuses/filter.json - name:pw"), HttpWebRequest)
>> > >            request.Credentials = New NetworkCredential("name", "pw")
>> > >            ' Get response
>> > >            response = DirectCast(request.GetResponse(),
>> > > HttpWebResponse)
>> >
>> > >            ' Get the response stream into a reader
>> > >            reader = New StreamReader(response.GetResponseStream())
>> >
>> > > The streaming api documentation says to create a file called track.txt
>> > > and add text similar to this without the quotes.   "track=peter, paul,
>> > > mary"
>> >
>> > > Then use curl
>> > > @track.txthttp://stream.twitter.com/1/statuses/filter.json
>> > > - name:pw
>> >
>> > > I can't believe I have to shell out to DOS and run the curl command
>> > > line.
>> >
>> > > My direct question is how do others incorportate the @track.txt in the
>> > > VB.Net web request?
>> >
>> > > Maybe something like this?
>> >
>> > >http://stream.twitter.com/1/statuses/filter.json- name:pw?
>> > > track.txt
>> >
>> > > Thanks- Hide quoted text -
>> >
>> > - Show quoted text -
>
>


Re: [twitter-dev] Authorize page for desk-top apps

2010-03-05 Thread Mark McBride
I'll forward this on to the front end team

  ---Mark

http://twitter.com/mccv


On Mon, Feb 22, 2010 at 7:15 PM, Zhami  wrote:

> When I invoke the authorize URL with a oauth_token, the Allow/Deny
> page comes up. My app is a desk-top app, not a Web site. Most of the
> text seems to reflect this, except on the right side, where it says:
>
> "Twitter takes your privacy very seriously.
> Please ensure that you trust this website with your information before
> proceeding!"
>
> I think that second line should refer to "app" not "website."
>
> Twitter folks: Is this something that can be tweaked for apps?
>


Re: [twitter-dev] Read/write app is sometimes denied read access

2010-03-05 Thread Mark McBride
Have you tried revoking your current access token, and then
re-authenticating?  In the settings -> connections page does it show your
app as approved for read and write access?

  ---Mark

http://twitter.com/mccv


On Fri, Mar 5, 2010 at 1:33 PM, Mike Travers  wrote:

> I have an application that has read/write access, which tries to
> create friendships.  Sometimes this works and sometimes it doesn't.
> Ie, when authenticated as mtraven, it works fine, but when
> authenticated with the test account mtraven_tunes, I get consistent
> errors like this:
>
>  request: /friendships/create.json?screen_name=3QD
>  Error from Twitter: Read-only application cannot POST
>
> I have cleared out all of the cookies for both twitter and my app so I
> don't think the problem can be a stale authentication token (the app
> was originally read-only).
>
> I'm kind of baffled by this, but perhaps there is some simple
> explanation.
> The app in question is at http://twitlines.net/blogs
>
> Thanks,
> Mike
>


Re: [twitter-dev] Location Data From Stream API

2010-03-05 Thread Mark McBride
Parsing the location field is probably your best bet, but I'd say you have a
challenging road ahead.  It is indeed a mess, but there are geocoding
solutions available to try and sort this stuff out.

  ---Mark

http://twitter.com/mccv


On Fri, Mar 5, 2010 at 1:04 PM, GeorgeMedia  wrote:

> OK my app basically provides a way for users to come to the site, and
> look at local tweets by city/state combo (I have to include state
> because a lot of states have identical city names).
>
> I WAS using the search API feature with geocodes to get local tweets
> and it worked PERFECTLY minus of course the limited data set problem
> -- but I obviously can't do that due to API call limits and having
> (hopefully :)) thousands of users per day searching for local tweets
> repeatedly.
>
> Now according to Raffi Krikorian
>
> "search, however, attempts to use other signals to determine where the
> tweet
> is, and will attempt to return "more" tweets when you use its "search"
> parameter.  it does not, however, expose those signals in the search
> results."
>
> Well, not having knowledge of those "other signals"... leaves me
> with pretty much nothing but the Location field to parse for location
> information. Right now I'm working on a DB search scheme to match
> likely city, state combos but other than that do you guys see any
> other methodology I may be overlooking??
>
> The location field, unless it contains lon/lat coordinates, is a mess
> of garbage, nonsense, mispelled names, and a host of other useless
> noise.
>
> The ones that have lon/lat information in the tweet location field are
> perfect because then I can do my own radius calculations locally. But,
> for example, out of a 1.5 million tweet sample only 100,200 of those
> had lon/lat coordinates :(
>
>


Re: [twitter-dev] Re: Need help with the streaming API syntax....specifically how to point to the track text file without using curl

2010-03-05 Thread Mark McBride
I think this is slightly backwards.  You want to use the GET method, but set
up the URI you have (with the track=Microsoft parameter).  You will also
need to authenticate.

Note that this is a streaming API.  I don't know VB all that well, but
there's a reasonable chance that this call only returns data when the HTTP
call has finished.  The streaming API will *never* finish, so you'll need to
parse data as it's available.  Without looking at VB doc I have no idea how
you would set that up.

  ---Mark

http://twitter.com/mccv


On Fri, Mar 5, 2010 at 9:54 AM, Mad Euchre  wrote:

> Thanks.
>
> Now I'm using the post method.
>
> How should I use the track parameter? Something like this?
>
>  address = New Uri("http://stream.twitter.com/1/statuses/filter.json?
> track=Microsoft")
>
> I'm getting connected but no data  that matches Microsoft is streaming
> over.No data for that matter.
>
> I'm passing my name and pw in the request.credentials method. The
> server returned a 200 OK when I added the credentials but not when it
> was in the URL alone.
>
> ie; address = New Uri("http://stream.twitter.com/1/statuses/
> filter.json?track=Microsoft - name:pw"
>
> Thanks,
>
> Peter
>
>
>
>
>
>
>
>
> On Mar 2, 5:19 pm, John Kalucki  wrote:
> > The text file approach only applies to POST parameters set from the curl
> > command, and in no other case.
> >
> > When creating an HTTP client from within a program, you should be able to
> > configure the POST parameters via method calls. If you can't, it's a
> pretty
> > worthless HTTP library. Each client library is different, check your
> docs.
> >
> > -John Kaluckihttp://twitter.com/jkalucki
> > Infrastructure, Twitter Inc.
> >
> >
> >
> > On Tue, Mar 2, 2010 at 12:42 PM, Mad Euchre 
> wrote:
> > > This is the VB code I would use to start any http stream
> >
> > >request = DirectCast(WebRequest.Create("http://
> > > stream.twitter.com/1/statuses/filter.json - name:pw"), HttpWebRequest)
> > >request.Credentials = New NetworkCredential("name", "pw")
> > >' Get response
> > >response = DirectCast(request.GetResponse(),
> > > HttpWebResponse)
> >
> > >' Get the response stream into a reader
> > >reader = New StreamReader(response.GetResponseStream())
> >
> > > The streaming api documentation says to create a file called track.txt
> > > and add text similar to this without the quotes.   "track=peter, paul,
> > > mary"
> >
> > > Then use curl @track.txthttp://
> stream.twitter.com/1/statuses/filter.json
> > > - name:pw
> >
> > > I can't believe I have to shell out to DOS and run the curl command
> > > line.
> >
> > > My direct question is how do others incorportate the @track.txt in the
> > > VB.Net web request?
> >
> > > Maybe something like this?
> >
> > >http://stream.twitter.com/1/statuses/filter.json- name:pw?
> > > track.txt
> >
> > > Thanks- Hide quoted text -
> >
> > - Show quoted text -
>


[twitter-dev] Location Data From Stream API

2010-03-05 Thread GeorgeMedia
OK my app basically provides a way for users to come to the site, and
look at local tweets by city/state combo (I have to include state
because a lot of states have identical city names).

I WAS using the search API feature with geocodes to get local tweets
and it worked PERFECTLY minus of course the limited data set problem
-- but I obviously can't do that due to API call limits and having
(hopefully :)) thousands of users per day searching for local tweets
repeatedly.

Now according to Raffi Krikorian

"search, however, attempts to use other signals to determine where the
tweet
is, and will attempt to return "more" tweets when you use its "search"
parameter.  it does not, however, expose those signals in the search
results."

Well, not having knowledge of those "other signals"... leaves me
with pretty much nothing but the Location field to parse for location
information. Right now I'm working on a DB search scheme to match
likely city, state combos but other than that do you guys see any
other methodology I may be overlooking??

The location field, unless it contains lon/lat coordinates, is a mess
of garbage, nonsense, mispelled names, and a host of other useless
noise.

The ones that have lon/lat information in the tweet location field are
perfect because then I can do my own radius calculations locally. But,
for example, out of a 1.5 million tweet sample only 100,200 of those
had lon/lat coordinates :(



[twitter-dev] Read/write app is sometimes denied read access

2010-03-05 Thread Mike Travers
I have an application that has read/write access, which tries to
create friendships.  Sometimes this works and sometimes it doesn't.
Ie, when authenticated as mtraven, it works fine, but when
authenticated with the test account mtraven_tunes, I get consistent
errors like this:

  request: /friendships/create.json?screen_name=3QD
  Error from Twitter: Read-only application cannot POST

I have cleared out all of the cookies for both twitter and my app so I
don't think the problem can be a stale authentication token (the app
was originally read-only).

I'm kind of baffled by this, but perhaps there is some simple
explanation.
The app in question is at http://twitlines.net/blogs

Thanks,
Mike


Re: [twitter-dev] What's the time to get xAuth request reviewed?

2010-03-05 Thread Mark McBride
Just to follow up on this, I think Anton is taken care of.

  ---Mark

http://twitter.com/mccv


On Thu, Mar 4, 2010 at 2:46 AM, Anton Krasovsky
wrote:

> Hi Raffi,
>
> I wonder what's the approx time to get xAuth request reviewed? I've
> submitted mine good two weeks ago (#866246) and haven't heard of it
> since?
> I don't mind waiting, but I wonder if it might have fallen through the
> cracks somehow.
>
> Regards,
> Anton
>


Re: [twitter-dev] Can't access old tweets via statuses/user_timeline

2010-03-05 Thread Mark McBride
Currently we only support retrieval of the last N tweets, where N is 3200 if
I recall.

  ---Mark

http://twitter.com/mccv


On Wed, Mar 3, 2010 at 3:26 PM, @seiz  wrote:

> Hi,
>
> I am Trying to backup all my tweets (for @seiz) but it seems tweets of
> a certain age aren't accessible via the api (the oldest tweet i get is
> ID 1226937920 from 02/2009).
> I am even using since_id and max_id restrictions in the API call in
> order to avoid hitting a pagination limit and still can't get any very
> old tweets.
> Same goes for mentions (and i guess everything else like DMs too).
>
> How can i get all my tweets in order to back them up?
> Note, i basically have to do this only once and then only get a daily/
> weekly or whatever delta using since_id, so it should not put too much
> load on the api.
>
> PS: there's also a BUG. when using max_id in the api call, the result
> will include tweets where ID==max_id which, according to the
> documentation should not be the case and only every thweet with an id
> between since_id and < max_id (but not including max_id) should be
> returned.
>
> (I filed a ticket on help.twitter, but am also posting here, as past
> experience seemed to indicate, that the ticketing system is not
> maintained – sorry for the cross posting)
>
> Thanks
> Stefan
>


Re: [twitter-dev] Re: Introduce yourself!

2010-03-05 Thread Mark McBride
I'm Mark McBride, (not to be confused initial-wise with Marcel Molina) and I
work on the Twitter platform team.  I've been working mostly on the
streaming API, but also odds and ends including monitoring of the API
status, various infrastructure bits, bug fixes, etc.  My background is
mostly in enterprise-y Java development.  Lately I've been doing mostly
Scala/Ruby, and know enough ActionScript and Objective-C to be
semi-dangerous.

  ---Mark

http://twitter.com/mccv


On Fri, Mar 5, 2010 at 7:17 AM, Lele  wrote:

> Hi all,
> I'm working at Cascaad (@cascaad).
> We're building a realtime personal information engine to distill from
> noisy conversation streams the tweets relevant to a user’s current
> interests.
> We've developed a web site to show our platform in action, an iPhone
> application and lately we released some free API.
>
> There's the chance to enrich tweets using our API and get semantic
> entity markup, nonintrusive in-text affiliate commerce links, related
> content, social relevance scores and more.
> This can be an interesting feature to add to a Twitter client.
>
> Bye
>
> http://www.cascaad.com
> http://developer.cascaad.com/
>


[twitter-dev] Re: xAuth

2010-03-05 Thread Berto
Three days and I still can't get this to work.  I even tried switching
over to GET instead of POST and it tells me "Failed to validate oauth
signature and token".  This is fully functional for regular oauth.
Signature Base String is:

Signature Base String: Signature Base String:
GET&https%3A%2F%2Fapi.twitter.com%2Foauth
%2Faccess_token&oauth_consumer_key%3D%26oauth_nonce
%3D1267819560%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp
%3D1267819217%26oauth_version%3D1.0%26x_auth_mode%3Dclient_auth
%26x_auth_password%3D%26x_auth_username%3D

I'm sending oauth parameters via the Authorization header and the
three xAuth parameters as GET parameters (?
x_auth_username=&x_auth_pass=&x_auth_mode=client_auth).

It appears as though everyone who had oauth working before had an easy
transition so I'm just a little curious why mine isn't working when I
literally have only changed the URL and three parameters.  I've
verified this is going over SSL as well.

Any help is appreciated.

Thanks.
On Mar 4, 3:34 pm, Anton Krasovsky  wrote:
> In case if anyone's interested (though I doubt there are many
> Erlang'ers on the list),
> I just addedxAuthsupport to twerl.
>
> http://github.com/ak1394/twerl
>
> Regards,
> Anton
>
> On Wed, Mar 3, 2010 at 4:57 PM, Berto  wrote:
> > Raffi,
>
> > Can you comment on the first part of Marc's last reply?
>
> > Thanks!
>
> > On Mar 3, 9:24 am, Marc Mims  wrote:
> >> * Berto  [100303 06:42]:
>
> >> > Isn't that using a GET request versus the docs saying POST?  And I
> >> > thought parameters were supposed to be normalized except for signature
> >> > which gets attached at the end?
>
> >> Hmmm. I completely missed the fact that the documentation specifies
> >> POST.  I used GET and it worked.  When I use a POST, I get a 401.
>
> >> Doc bug?
>
> >> The order you *send* the parameters doesn't matter---the order of the
> >> base string used for generating the signature does.
>
> >> The underlying libraries I use assemble the parameters in an arbitrary
> >> order.  Generation of the signature is a separate call and builds it's
> >> own base string from a hash (associative array).
>
> >> @semifor


Re: [twitter-dev] Re: Deprecating /statuses/public_timeline resource on 4/5/10

2010-03-05 Thread Raffi Krikorian
fixed.

On Fri, Mar 5, 2010 at 6:10 AM, earth2marsh  wrote:

> BTW, it doesn't look like the docs on the apiwiki have been updated
> with the deprecation notice.
>



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


[twitter-dev] Re: Need help with the streaming API syntax....specifically how to point to the track text file without using curl

2010-03-05 Thread Mad Euchre
Thanks.

Now I'm using the post method.

How should I use the track parameter? Something like this?

 address = New Uri("http://stream.twitter.com/1/statuses/filter.json?
track=Microsoft")

I'm getting connected but no data  that matches Microsoft is streaming
over.No data for that matter.

I'm passing my name and pw in the request.credentials method. The
server returned a 200 OK when I added the credentials but not when it
was in the URL alone.

ie; address = New Uri("http://stream.twitter.com/1/statuses/
filter.json?track=Microsoft - name:pw"

Thanks,

Peter








On Mar 2, 5:19 pm, John Kalucki  wrote:
> The text file approach only applies to POST parameters set from the curl
> command, and in no other case.
>
> When creating an HTTP client from within a program, you should be able to
> configure the POST parameters via method calls. If you can't, it's a pretty
> worthless HTTP library. Each client library is different, check your docs.
>
> -John Kaluckihttp://twitter.com/jkalucki
> Infrastructure, Twitter Inc.
>
>
>
> On Tue, Mar 2, 2010 at 12:42 PM, Mad Euchre  wrote:
> > This is the VB code I would use to start any http stream
>
> >            request = DirectCast(WebRequest.Create("http://
> > stream.twitter.com/1/statuses/filter.json - name:pw"), HttpWebRequest)
> >            request.Credentials = New NetworkCredential("name", "pw")
> >            ' Get response
> >            response = DirectCast(request.GetResponse(),
> > HttpWebResponse)
>
> >            ' Get the response stream into a reader
> >            reader = New StreamReader(response.GetResponseStream())
>
> > The streaming api documentation says to create a file called track.txt
> > and add text similar to this without the quotes.   "track=peter, paul,
> > mary"
>
> > Then use curl @track.txthttp://stream.twitter.com/1/statuses/filter.json
> > - name:pw
>
> > I can't believe I have to shell out to DOS and run the curl command
> > line.
>
> > My direct question is how do others incorportate the @track.txt in the
> > VB.Net web request?
>
> > Maybe something like this?
>
> >http://stream.twitter.com/1/statuses/filter.json- name:pw?
> > track.txt
>
> > Thanks- Hide quoted text -
>
> - Show quoted text -


[twitter-dev] Re: Introduce yourself!

2010-03-05 Thread Lele
Hi all,
I'm working at Cascaad (@cascaad).
We're building a realtime personal information engine to distill from
noisy conversation streams the tweets relevant to a user’s current
interests.
We've developed a web site to show our platform in action, an iPhone
application and lately we released some free API.

There's the chance to enrich tweets using our API and get semantic
entity markup, nonintrusive in-text affiliate commerce links, related
content, social relevance scores and more.
This can be an interesting feature to add to a Twitter client.

Bye

http://www.cascaad.com
http://developer.cascaad.com/


[twitter-dev] Re: Deprecating /statuses/public_timeline resource on 4/5/10

2010-03-05 Thread earth2marsh
BTW, it doesn't look like the docs on the apiwiki have been updated
with the deprecation notice.


Re: [twitter-dev] link to disabled acct

2010-03-05 Thread Thomas Woolway
Twitter brings up a page saying something like 'This account has been
suspended'. That's the same whether you try to open the user's profile page
or an individual tweet.

Tom

On Fri, Mar 5, 2010 at 11:39 AM, Frank  wrote:

> If an account is disabled will a link to it on  a webpage still bring
> it up?
>


[twitter-dev] link to disabled acct

2010-03-05 Thread Frank
If an account is disabled will a link to it on  a webpage still bring
it up?