Simon Willison’s Weblog

125 items tagged “twitter”

Why did Twitter move away from being a single-page application?

Twitter is still a single page application, it’s just built properly now (one result of which is that you can’t easily tell).

[... 712 words]

What do Twitter and Gawker think of hash-bangs URLs?

As of December 2013 (and potentially much earlier, I don’t have the exact dates) both Twitter and a Gawker have moved away from hash bang URLs, so my guess is they turned out not to be a good idea.

[... 82 words]

How do I put my Twitter picture on my company’s about page so that it automatically updates?

This used to be pretty easy, but Twitter made it a lot harder with their APIv1. You need to do authenticated API calls to access their image API now, which means it’s best to set up a cron job and cache the correct URL.

[... 125 words]

How did The Voice implement Twitter voting?

You don’t need full firehouse access to implement this—you can use the statuses/filter API to get a feed of tweets that match a specific hash tag: https://dev.twitter.com/docs/api...

[... 63 words]

It is posible to send an RSS feed to Twitter geolocalized?

Yes, this is possible using the Twitter API. A competent web programmer should be ale to build this for you in a few hours.

[... 41 words]

Why can’t Twitter Web Intent pages be loaded into an iframe?

I imagine this is to discourage clickjacking: http://en.m.wikipedia.org/wiki/C...

[... 26 words]

Using userstream to listen to events for each user doesn’t seem practicable for an application with thousands of users.

Sounds like you need Site streams: https://dev.twitter.com/docs/str...

[... 55 words]

If one were to bring the concept of Twitter to a VC today, would it be invested in, or turned away?

If someone brought just the concept without any form of actual implementation (of something that is pretty easy to prototype) I don’t think they would get very far.

[... 55 words]

Does Twitter still care about Tweetdeck?

Anecdotal: I personally know two people who have joined the TweetDeck team at Twitter in the past year. They frequently ship improvements, and seem to be enjoying themselves.

[... 40 words]

What are some good examples of tweets used to attract visitors to a new website?

Without knowing what the site does, I’d go for the personal approach: "I just launched my new project, example.com—check it out and let me know what you think!"

[... 52 words]

Where is Twitter’s office in London?

Just off Great Portland Street.

[... 17 words]

What could be the reason my login with Twitter stopped work in web site?

Yes, there have been breaking changes recently. You need to make sure you are running on Twitter’s API v1.1: https://dev.twitter.com/docs/api...

[... 41 words]

Is Twitter using its public api for its own website?

You can use Firebug or the Chrome network inspector to answer this question for yourself. They used to use the API for pretty much all of the site, but I think they’re backing off that a little know heat they serve real pages with real URLs for things like individual profile pages.

[... 68 words]

What are the ways to get your links expand in Twitter inline?

This feature is called Twitter Cards - you need to add some metadata to your pages, then apply to Twitter for inclusion in the program (they currently operate a whitelist of sites). See the documentation for more details.

[... 57 words]

How does Twitter select trending topics?

They use stream processing algorithms—they mention trending topics calculation in their technical blog entry about Storm, their open source stream processing software: http://engineering.twitter.com/2...

[... 38 words]

What is the most efficient way to lookup an object (e.g. a user) by only a string?

Yes—an index on a varchar column is exactly how you would implement this.

[... 38 words]

Why does Twitter use a hashbang instead of using the History API?

I asked a friend who is an engineer there about this a while ago. When they shipped the first version of Twitter that used fully Ajax driven pages there was a critical bug with pushState in a widely deployed version of Safari, which made it impractical to commit to.

[... 67 words]

Why did Twitter have so many problems if it is made with Ruby?

The technical problem Twitter solves (distributing millions of short messages per minute to an enormous graph of follow relationships) is extremely hard in any language.

[... 44 words]

Do Twitter API limits rest at the top of the hour or is it floating?

I’m pretty sure they are calculated from the time of the first hit you make to the API—resetting on the hour would likely encourage API users to run large batches of queries at 1 second past the hour, resulting in huge and unwanted traffic spikes.

[... 68 words]

What is a Twitter alternative for internal teams?

Yammer is the most obvious tool here.

[... 78 words]

How to get a Twitter user’s join date?

It’s included in the standard user JSON that comes back with any tweet—or you can hit http://api.twitter.com/1/users/s... and look at the created_at key

[... 40 words]

Twitter API: What is the best data storage mechanism and client library for analysing tweets using Python?

It depends on how much data you intend to collect, and how you intend to then share that data.

[... 182 words]

Is there a way of tracking shortened URLs with Twitter streaming API?

Think about it like this: the whole point of the Twitter streaming API is to get you the tweets as soon after they are posted as possible. If the API were to provide access to the lengthened URLs, it would have to delay emitting a Tweet on to the stream until a resolver had gone through each shortened URL in the tweet and checked to find what it redirects to. This would mean that the speed with which the streaming API could deal out tweets would be dependent on the speed of the third party servers that serve up the redirects. I doubt Twitter would ever want to implement this.

[... 159 words]

The science of the hashtag. Interesting analysis of how the #lessambitiousmovies hash tag took off thanks to retweets from a couple of key users with very creative followers. # 14th January 2011, 4:02 am

How do Twitter apps handle username changes?

Twitter assigns each user a unique numeric ID which does NOT change when the user’s Twitter name changes, so triic number one is to key off that, not the username itself.

[... 150 words]

How do you correctly send the oauth_verifier parameter using python-oauth2 and the Twitter API?

This seems relevant: http://groups.google.com/group/t...

[... 87 words]

Are there any well-known websites that use Facebook connect or Twitter OAuth as the only sign-in solution without its own sign-in password?

Our site http://lanyrd.com/ only accepts Twitter OAuth logins (at least for the moment).

[... 42 words]

Is it possible to link to a Twitter user’s page with their user_id instead of their screen name?

You could always build your own URL to do this as part of your own application—something like http://your-twitter-app.example.... which does a Twitter API lookup for that user and then redirects to http://twitter.com/their-twitter.... You can cache the ID-to-screen-name lookups that you’ve made in the past (not forever though, remember people occasionally change their screen names).

[... 98 words]

Does Twitter use a 3rd party software for rate limiting their APIs? If yes, who’s the 3rd party?

I wrote up a technique for doing simple rate limiting using memcached a while ago, which I later found out was somewhat similar to how the Twitter API does it.

[... 56 words]

WebKit is Dropping HTML5 “popstate” Events (via) Really nasty bug with WebKit’s pushState support, discovered by Ben Cherry from Twitter. popState events get dropped if the user navigates while an outbound network request is in progress. # 30th October 2010, 7:41 am