Marc Mims. @semifor. Author and maintainer of Net::Twitter [1], the Perl
interface to the Twitter API. I'm a freelance software developer
specializing in modern perl (Moose, Catalyst, DBIx::Class, and
Net::Twitter, of course).
I'm a Linux enthusiast and run Debian on my personal sy
* rob [100219 08:56]:
> Has anyone else ran into an issue where over time the Streaming API
> just stops sending results?
Yes. I'm seeing the same thing. I've set up a 45 second timeout. The
following entries were extracted from the application log. I'm
currently following < 100 users, so perio
* John Kalucki [100220 20:24]:
> A 45 second period of inactivity is not unusual when following just 100, or
> even 100,000 users. The keep-alive newlines are only sent once every 10
> minutes. You should not reconnect so aggressively.
I can certainly set the time out to 10 minutes. I'm seeing n
* John Kalucki [100220 21:02]:
> Arg. This is what I get for not checking the configuration each time. Yes,
> it's currently set to send a newline every 30 seconds.
Ok. Sorry to drag this out, but what, then, is an appropriate timeout
value for the application?
@semifor
* John Kalucki [100222 10:51]:
> If you had a correlative experience within a minute or so of 15:55 UTC,
> please respond to this message.
Indeed, I did. From the application log:
2010/02/22 07:56:14 9481340618: RT @whitehouse: The Presi...
2010/02/22 07:57:14 timeout
2010/02/22 07:57:14 Waitin
> On Mon, Feb 22, 2010 at 1:53 PM, Scott Wilcox wrote:
>
> > Same issue here, over the past six hours more than ever.
* John Kalucki [100222 14:25]:
> I don't believe that we've seen this issue since 15:55 UTC. If you've been
> seeing hangs more often, it's possible that you are experiencing an
* Lil Peck [100223 10:48]:
> On Mon, Feb 22, 2010 at 11:10 PM, Paul Tarjan wrote:
> > Is there a permanent profile URL for users? Something like
> >
> > http://twitter.com/account/profile?user_id=14757201
> >
> > I'd like something that is ID based (since users can change their
> > short form) bu
I have implemented xAuth in Perl Net::Twitter, but it is currently
untested. I am waiting approval of an xAuth access request for one of
my own OAuth apps so I can test it.
I shipped a developer release to CPAN. It should be available, soon [1].
If you're a perl dev and have xAuth access for you
* Marc Mims [100226 17:36]:
> I have implemented xAuth in Perl Net::Twitter, but it is currently
> untested. I am waiting approval of an xAuth access request for one of
> my own OAuth apps so I can test it.
Raffi gave me xAuth access to one of my own apps. After a minor code
change,
In response the announcement of new upcoming geo features [1], I've
released a new verison of Perl Net::Twitter two new methods:
- reverse_geocode
- geo_id
The "update" method has been updated to include new parameters:
- place_id
- display_coordinates
The new version will be av
* Berto [100302 13:28]:
> At first I thought this might be because HttpURLConnection wasn't
> handling SSL, but then I switched over to HttpPost (this code is in
> Java) which I know will handle SSL and I'm still getting a 401. I'm
> doing everything the same as with oauth, except passing the req
* TJ Luoma [100302 15:58]:
> I'm not even sure what Twitter is talking about. The initial post in
> this thread was completely vague.
>
> This is fairly troublesome, considering that:
>
> $ curl --location --referer ";auto" -D - -s --netrc
> "http://api.twitter.com/1/account/verify_credentials.x
* 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 work
* M. Edward (Ed) Borasky [100303 19:46]:
> I haven't looked at all of the libraries, but the two I've worked
> with, one in Ruby and one in Perl, both translate the raw JSON
> coming out of Streaming into "native" objects. This isn't going to
> scale, and Twitter recommends against it.
Perl AnyEv
* Michael Steuer [100309 17:25]:
> Wouldn't you yourself know best how to calculate how many people are
> actively using your app?
Sure, if it's a web app. But if it's a desktop app, especially an open
source desktop app, the count twitter provides may be the only way to
know.
@semifor
The Streaming API is great. It would be better if it included more
events. I'd love to see favorites and social graph changes (new
friends/followers in the Streaming API. It would drastically reduce the
number of polling requests apps need to make to Twitter.
@semifor
* John Kalucki [100310 09:56]:
> Noted. In the plan.
>
> [Wait a second, is this Mark McBride on a fake account?]
No. Haven't met Mark McBride, yet, but I'm sure I'm not him. And I'm
real---at least I think so. But you've got me worried, now. :)
@semifor, Marc-with-a-cee, the Net::Twitter guy
* Mark McBride [100312 13:24]:
> Am I missing something regarding the complexity of doing this?
>
> Ruby pseudo-code:
>
> my_unread_tweets = []
> page = 1
> count = 200
> since_id = 123098485120985
>
> while(page_of_tweets = get_tweets("
> http://api.twitter.com/1/statuses/home_timeline.json?pa
I just noticed this is my application error log:
Could not follow user: ist bereits auf Deiner Liste.
The application has special handling for "already on your list".
It seems very inappropriate, to me, for the API to localize error
messages. Certainly, error messages displayed on the web p
$ curl http://api.twitter.com/1/favorites.json?screen_name=semifor |
xclip
% Total% Received % Xferd Average Speed TimeTime
Time Current
Dload Upload Total Spent
Left Speed
100 4659 100 46590 0 13953 0 --:--:-- --:--:--
--:--:--
I'm the author/maintainer of Net::Twitter, the perl library for the
Twitter API. I have an account, @net_twitter, I use to communicate
with the users of the Net::Twitter module. Several times (most
recently, today), the account has been reverted to its state on or
about May 30, 2009.
I'm postin
Updates longer than 140 characters should be forcibly truncated
according to the documentation. Instead, the update call returns with
a 200 status and the payload contains the prior update.
Has there been a change to the API or is this a bug.
On Oct 20, 4:28 am, Nigel Cannings
wrote:
> I found an issue using the "server" example included in Net::Twitter
> (oauth_webapp.pl).
Hi, Nigel. I'm the author of Net::Twitter. I'd like to update the
sample included
with the distribution to fix the problem you encountered, but I don't
complete
On Oct 21, 11:28 pm, Nigel Cannings
wrote:
> Sorry, I should have said that it is the authorization url that
> remains the same until a user actually accepts your application.
>
> It is the authorization url that becomes stale if reused, or unused
> for a period of time. Access tokens, as you qu
On Oct 22, 12:54 am, Jesse Stay wrote:
> Same here! BTW, if anyone wants a Catalyst OAuth Authentication::Credentials
> module I've got one written - just getting it ready for CPAN right now.
Jesse, let me know when the module is on CPAN. I'll add it to the SEE
ALSO
section in the Net::Twitter
I uploaded a development release of Net::Twitter to CPAN with Lists API
support. If you're a perl developer and you're on the Lists beta,
please test it and give me some feedback.
Download it here:
http://search.cpan.org/~mmims/Net-Twitter-3.07999_01/
For documentation see:
perldoc Net::Tw
* Scott Elcomb [091028 21:37]:
> On Sat, Oct 24, 2009 at 12:47 AM, Marc Mims wrote:
> > In my own testing, I've noticed that the update_list call always returns
> > a 500 status, even though it succeeds. That's probably a Twitter bug
> > that will be worke
* neal rauhauser [100115 21:42]:
> I've been working with Net::Twitter, specifically the Lists API, and I've
> run right into a brick wall. I've called add_list_member with every mix of
> name, id, slug, etc I could try, and I keep getting a "Not found" as a
> response. The userid/password pair
* John Kalucki [091209 09:28]:
> A cursor should be valid forever, but as it ages and rows are removed, you
> might see some minor data loss and probably more duplicates.
Out of curiosity, what is a cursor? From our (the users') perspective,
it's just an opaque number. But I'm curious. How is
* Isaiah Carew [100118 19:02]:
> If every person that uses an app accesses the API with their own personal app
> credentials that would mean the app would appear to Twitter as hundreds, or
> potentially thousands, of individual applications.
>
> One goal of application registration is to contro
* John Meyer [100118 19:38]:
> But you still control your own keys. If you find that somebody has
> compromised your program, you can revoke those consumer keys through
> twitter and regenerate them.
That isn't reasonable. If my desktop app has 10,000 users, and one user
extracts and uses the c
* ryan alford [100118 20:01]:
> The consumer secret is not public. The consumer key can be seen in the
> query parameters, but the consumer secret is not a query parameter. It
> would have to be reverse engineered using the signature.
>
> If twitter determines that a specific application is mal
* Abraham Williams <4bra...@gmail.com> [100118 20:10]:
> If rolling out a new update is a burdon on you and your user you are doing
> it wrong. http://code.google.com/p/omaha/
Rolling out a new version because someone compromised the consumer key
pair is a burden. Are you prepared to roll out a n
* John Meyer [100118 20:12]:
> Which would probably have its own feasibility problems. If I'm a
> malware producer, for instance, I'm not just going to compromise one
> user account with one consumer keypair. I'm going to compromise ten
> thousand users.
That's the beauty of OAuth. Even if you
* ryan alford [100118 21:03]:
> Who said that was even an option? I haven't seen one person who said that
> requiring every user to create their own consumer keys to use with an
> application was an option. The only reason that is even in this discussion
> is because somebody misinterpreted an a
* Raffi Krikorian [100201 07:36]:
> >
> > c. The Streaming API isn't designed to play well with desktops /
> > laptops / mobiles.
> >
>
> (not to change the direction of the thread) just out of curiosity - why do
> you think that's the case? we don't intend it not to play well, and want to
> kno
* John Kalucki [091030 06:41]:
> Currently the Streaming APIs are not intended for use by clients, but
> mostly for use by services. Therefore oauth is not yet supported.
> There's little need to pass an end-user's credentials on to the
> Streaming API as all data currently available is public. Ra
I occasionally see 401 responses calling access_token.
At the point of call, I have valid request tokens. The user has been
redirected to Twitter, has authorized the app (as evidenced by the fact
that the user is redirected to the apps's callback URL).
The application uses the oauth_token parame
I occasionally see 401 responses calling access_token.
At the point of call, I have valid request tokens. The user has been
redirected to Twitter, has authorized the app (as evidenced by the
fact
that the user is redirected to the apps's callback URL).
The application uses the oauth_token parame
It looks like error responses have changed, at least for users/show.
I used to get:
{"error":"User has been suspended"}
Now, I get:
{"errors":[{"code":63,"message":"User has been suspended"}]}
Other methods still return the old format, e.g., statuses/show. I get:
{"request":"/1/statuses/show/12
* Raffi Krikorian [100827 06:03]:
> this is most certainly a mistake on our part - we'll be reverting this
> change.
The new error format looks useful, especially if the error code allows
us to deal with multi-lingual error messages consistently. Obviously,
some advanced notice and consistency a
* Raffi Krikorian [100827 06:54]:
> All newer API methods have been returning API error codes for a while
> now. We have been extremely sensitive to not breaking older behavior
> (for backwards compatbility reasons), so older methods still return
> the old format. We have been toying with the ab
* Taylor Singletary [100827 11:11]:
> Can you provide any more details about the error response you're
> giving (like the actual body of the error response)?
Taylor, I will capture the full request and response. I assume they are
not suitable for posting in a public forum. Should I email the to
* Raffi Krikorian [100827 06:03]:
> hi all.
>
> this is most certainly a mistake on our part - we'll be reverting this
> change.
Raffi, we're still seeing these unexpected error structures. When will
the change be reverted?
-Marc
> On Fri, Aug 27, 2010 at 4:45 AM, Cameron Kaiser wrot
* Raffi Krikorian [100830 05:48]:
> what endpoints are you still seeing this error format under? the change
> should have been reverted in the case that you were mentioning.
Like Cameron, I'm seeing it on users/show. Here's an example:
GET http://api.twitter.com/1/users/show/178618878.json
{"e
ata.
-Marc
> On Fri, Aug 27, 2010 at 5:16 PM, Marc Mims wrote:
> > * Taylor Singletary [100827 11:11]:
> >> Can you provide any more details about the error response you're
> >> giving (like the actual body of the error response)?
> >
> > Taylo
ou still seeing this error format under? the change
> should have been reverted in the case that you were mentioning.
>
> On Sun, Aug 29, 2010 at 9:00 AM, Marc Mims wrote:
>
> > * Raffi Krikorian [100827 06:03]:
> > > hi all.
> > >
> > > this is
* Cradash [100901 06:40]:
> We have been getting a {"errors":[{"code":53,"message":"Basic
> authentication is not supported"}]} error on our feeds for the last 15
> or so hours, our feeds tweet at most 5 times an hour but have become
> inactive because of this error. We are using Jtwitter and have
* Taylor Singletary [100827 11:11]:
> Can you provide any more details about the error response you're
> giving (like the actual body of the error response)?
Taylor, I emailed the full HTTP request and response along with the
request token/secret for one of these 401 errors we're seeing. Did you
* Taylor Singletary [100901 08:35]:
>
> I'll try to respond to you today. It's no excuse, I know, but we've been
> busy! :)
Thanks, Taylor.
--
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tr
* Taylor Singletary [100901 08:35]:
> I'll try to respond to you today. It's no excuse, I know, but we've been
> busy! :)
*nudge*
--
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http
* Lars [100902 14:38]:
> I am not a Perl expert but I have developed a small web page with Perl
> which is somewhat popular in Germany (according to Alexa trafic rank <
> 1000). And this web site is tweeting important events using its own
> twitter account.
>
> I tried for days but I am not able
* mikesouthern [100904 19:56]:
> I'm not a developer. I just use perl scripts to automate my twitter
> feeds.
For perl devs, the move to OAuth is really quite easy, especially for
automated scripts.
Register an application at http://dev.twitter.com. Grab the consumer
key and secret, and the acce
* mikesouthern [100904 19:57]:
> But ... but ... I'm trying to do a similar kind of thing from a perl
> command line.
See my reply in an earlier thread:
http://groups.google.com/group/twitter-development-talk/browse_thread/thread/160cb4d3f20ef61
-Marc
--
Twitter developer documentation
* mikesouthern [100904 19:59]:
> I had a really simple perl net::twitter script that ran as a cron job
> off my laptop. All it did was, for each scheduled run, read a single
> line of information from a txt file, then tweet the line to any one of
> three twitter accounts.
Copied from an earlier r
* Gerard M [100909 05:47]:
> Any Perl equivalent for "three lines" ? I can convert to PHP if
> needed, but it is a bit of a hassle...
Yes.
See the example code here:
http://github.com/semifor/Net-Twitter/wiki/Net::Twitter-and-the-death-of-Basic-Authentication
-Marc
--
Twitter develop
* wkossen [100910 06:45]:
>
> my $client = Net::Twitter->new(
> consumer_key => $ckey,
> consumer_secret => $csec,
> access_token => $atok,
> access_secret => $asec,
> );
You need to include the OAuth trait:
my $client = Net::Twitter->new(
traits => ['OAuth', 'API::REST'
* sftriman [100921 16:46]:
> I downloaded the /examples in Net::Twitter, and they don't seem to
> work. There were 2 in that directory. I've searched tons on Google,
> and I've read both links on the dev.twitter.com site for perl, but
> can't get those to work. Maybe someone here can help?
Dav
* wkossen [100922 06:09]:
> Added the traits bit, now I get 'Could not authenticate you.'. help?
Have you verified your credentials (consumer key/secret, access
token/secret)? If you can email me some code (sans credentials) I'd be
happy to take a look at it.
-Marc
--
Twitter develo
* sftriman [100922 08:45]:
> HTTP::Message is up to date (5.810).
> perlmod--Install done
>
> Is there an HTTP::Request update I'm supposed to do?
The current version if HTTP::Request is 5.827. You may need to use a
different mirror---it seems the one you're using is a bit out-of-date.
An upgra
* Darren [100922 08:53]:
> I'm using Perl with NET::Twitter::Lite to send messages to an account
> on Twitter which works fine from the command line but as soon as I put
> it inside a CRONTAB it won't work at all. I've got all the paths
> correct for a script within a crontab, it just seems to fai
* Darren [100923 06:04]:
> I've tried adding in PERL5LIB for cron; still a problem the code that
> falls over in the crontab is as follows:
>
> $result = eval { $nt->update($text) };
>
> if ( $@ )
> {
> errorTrap("update failed because: $@");
> }
>
>
> When it runs on the command lin
* sftriman [100923 07:19]:
> I see - well, I'm using cPanel and tried, got this:
>
> Installing Perl Module "HTTP::Message"
>
> Method: Perl Expect
> Testing connection speed...(using fast method)...Done
> Ping:0 (ticks) Testing connection speed to cpan.erlbaum.net using
> pureperl...(14957.14 b
* wkossen [100930 01:25]:
>
> my $client = Net::Twitter->new(
> traits => ['OAuth', 'API::REST'],
> consumer_key => $ckey,
> consumer_secret => $csec,
> access_token => $atok,
> access_secret => $asec,
Here's the problem. It's access_token_secret, not access_secret.
I also
* sftriman [100930 10:01]:
> I have a VPS, so I should be able to update perl modules as I'd like
> to.
> Is there some dependency tree that is causing the HTTP::Message
> (and/or HTTP::Request) module to be held back? Rather than use
> the local::lib approach, I'd just like to get the latest and
* sftriman [100930 13:38]:
> Well, finding your site SuperTweet.net today was a great find for me!
> So I hope it doesn't go away any time soon. And I will be donating to
> your cause shortly.
>
> I updated my perl code using Net::Twitter to do oAuth - but it didn't
> work right. That's because
* James McGill [101021 18:34]:
> I'm trying to use Net::Twitter::Lite OAuth.
>
> [...]
> unless ( $nt->authorized ) {
> # The client is not yet authorized: Do it now
> print "Authorize this app at ", $nt->get_authorization_url, "
> and enter the PIN#\n";
> [...]
>
> which produces:
De-duplicating statuses in the Streaming API is fairly straightforward.
But with Site Streams, where a single status might be received multiple
times for multiple mentioned users, and/or as favorites, it is a bit
more difficult.
I'm wondering if anyone can offer advice on an efficient method for
d
Just helped a user of Net::Twitter troubleshoot a problem. The user was
getting an "invalid / used nonce" error on statuses/update. Turns out,
the time clock was 4 hours off.
An "invalid timestamp" error would have really been helpful in this
case. Hint. HINT. HINT!!! :)
-Marc
--
Tw
* John Kalucki [101031 20:30]:
> Create two in-memory hash sets of seen ids. Write ids to both. If the id is
> found on write, discard. Alternatively expire them every few tens of
> minutes to bound growth, but provide continuous coverage.
That's what I'm doing now for the Streaming API and it w
* Mark McBride [101101 12:26]:
> Isn't this a matter of just changing the keys? status_id becomes
> user_id":"status_id?
Yes. Probably needs to be user_id/type/status_id to accommodate the
case where a user favorites a status she was mentioned in. We'd get
that one, twice---once for the mentio
* Cameron Kaiser [101106 15:10]:
If you are on a Perl that does not have 64-bit int and you are not using
the stringified *_str fields, you may have overflowed the Perl precision
limit this morning, which bit TTYtter users hard. Just a friendly warning
to check your code, or use BigInt if you ca
* Cameron Kaiser [101109 20:41]:
> If you are on a Perl that does not have 64-bit int and you are not using
> the stringified *_str fields, you may have overflowed the Perl precision
> limit this morning, which bit TTYtter users hard. Just a friendly warning
> to check your code, or use BigInt i
I have an ongoing problem with "401 Unauthorized" errors calling
access_token after the user has successfully authorized the app. It
happens on a small percentage of calls, but frequently enough (usually
several times per day) to be quite annoying and leads to user
complaints.
I've provided t
Here's another one:
### request_token request ###
GET https://api.twitter.com/oauth/request_token
Authorization: OAuth
oauth_callback="",oauth_consumer_key="",oauth_nonce="6hEehWMV3NIXsVWyFz4q8mjeTsI",oauth_signature="6hCY%2FrfPwpM%2F1hxvEJ9CxNgHGhU%3D",oauth_signature_method="HMAC-SHA1",oauth_t
* Sol [110115 11:02]:
> Hello. I'm trying to tweet programmatically using the
> Net::Twitter::Lite perl module. I use their example verbatim, with my
> consumer_key and consumer_secret which I got by registering an app on
> twitter.
Did you also copy/paste your access token and access token secre
On Fri, Jan 28, 2011 at 3:02 PM, Sol wrote:
> Where do the access token and access token secret come from?
> I thought they cam from some computation that twitter does with
> the consumer key and consumer_secret. If they don't come from
> there then what do I do to generate/get them?
Visit http:
On Feb 10, 8:40 am, Peter Motyka wrote:
> I'm seeing intermittent issues as well on the /oauth/access_token endpoint.
> Have you ever gotten to the bottom of this or is it just best to handle the
> error and retry? Below is a capture of my HTTP requests:
No resolution on this issue. I've collec
* Taylor Singletary [110228 06:57]:
> Thanks for the reports -- we're looking into the timeout issue.
I've been seeing this, too. To combat it, I've set my request timeout to
8 seconds and I use with Net::Twitter's RetryOnError trait (perl).
Last year, at Chrip, one of the speakers said Twitter
* ce [110228 12:01]:
> A totally different user! There appears to be no way to get the
> proper numerical id from the search API. Am I doing something wrong
> or is this a known issue and I should just rewrite to use their screen
> name to look up users instead?
See the "Warning" here:
http://d
If you're using Net::Twitter's friends_ids or follower_ids methods
without a cursor parameter, an upcoming Twitter API change will break
your code.
I've added an AutoCursor trait (currently in a developer only release),
to deal as transparently as possible with the change.
I blogged about it h
On Mar 27, 4:30 pm, "M. Edward (Ed) Borasky" wrote:
> I've had explicit cursor / page logic in all my Net::Twitter calls
> since I started using it - is there any reason to switch to AutoCursor?
Probably not. If you're using cursors in the same way AutoCursor does,
then using AutoCursor would m
On Wed, May 18, 2011 at 11:37 AM, Jon Colverson wrote:
>
> Also on the subject of granularity, it would be great if the app could
> request DM access but make it optional, such that users can turn it
> off on the authorization page. If the user declines it then the app
> would be able to ask them
83 matches
Mail list logo