Christian Heilmann

Using Twitter as a data provider to automatically fill forms

Thursday, January 8th, 2009 at 7:40 pm

I hate having to enter all my details when I fill forms – especially when I know for a fact that I’ve entered them before. Looking at Smashing Magazine’s Twitter Avatar WordPress Plugin I got to play with the show API of twitter, which gives you user information.

For example to get my information in Twitter you can just call http://twitter.com/users/show/codepo8.xml and get all I entered. This is also available in JSON and with a callback parameter. You can also do a lookup by email, by calling http://twitter.com/users/show/show.xml?email=you@yourserver.com. Using both of these together, I thought it’d be a good idea to use this API to automatically fill forms.

I’ve created a quick proof of concept: automatically filling forms with twitter data . If you want to use the script yourself (twitterfill.js), simply add it to the page with your form and give it the right parameters in the init method. For the demo page this is:




The parameters are label, which is the text of the button, loading, which is the loading message, mailfield, which is the ID of the email field (the button will be inserted after it), and name,location and url which are the IDs of the form fields you want to fill.

Tags: , , ,

Share on Mastodon (needs instance)

Share on Twitter

Newsletter

Check out the Dev Digest Newsletter I write every week for WeAreDevelopers. Latest issues:

Dev Digest 146: 🥱 React fatigue 📊 Query anything with SQL 🧠 AI News

Why it may not be needed to learn React, why Deepfake masks will be a big problem and your spirit animal in body fat! 

Dev Digest 147: Free Copilot! Panel: AI and devs! RTO is bad! Pi plays!

Free Copilot! Experts discuss what AI means for devs. Don't trust containers. Mandated RTO means brain drain. And Pi plays Pokemon!

Dev Digest 148: Behind the scenes of Dev Digest & end of the year reports.

In 50 editions of Dev Digest we gave you 2081 resources. Join us in looking back and learn about all the trends this year.

Dev Digest 149: Wordpress break, VW tracking leak, ChatGPT vs Google.

Slowly starting 2025 we look at ChatGPT vs Google, Copilot vs. Cursor and the state of AI crawlers to replace web search…

Dev Digest 150: Shifting manually to AI.

Manual coding is becoming less of a skill. How can we ensure the quality of generated code? Also, unpacking an APK can get you an AI model.

My other work: