Jul 3, 2013 by Matt | Posted in Coding
What can you do if you don’t like either option?
I’m using this right now on my personal blog, since Twitter’s new widgets don’t look very good when they’re crammed into a narrow sidebar.
Jan 9, 2013 by Matt | Posted in Coding, Featured
Back in 2009, I wrote a post on how to write a simple PHP script to call on the Twitter API and update your status. Despite its popularity, the information hasn’t been relevant in some time. (Things certainly have changed since then!) The Twitter API has changed a lot over the years, and it’s not so simple that you can get a newbie up and running with a few lines of code.
The mandatory usage of OAuth tokens, rather than a simple username and password combination, for API requests has greatly strengthened account security, but it’s one of the prime hurdles complicating the process. More recently, XML support was removed in favor of JSON, URL structures changed to include an API version, and authentication is now required for every request.
Fortunately, you don’t have to deal with the little details. You can use a library that does the heavy lifting for you, rather than reinventing the wheel. Sure, there are resources to learn how to do it the hard way, but I assume that you want a quicker solution if you’re reading this.
Step 1: Download tmhOAuth
Download the tmhOAuth library from GitHub. This package will handle interactions with the Twitter API once you include it from your script. (It requires at least PHP 5.1.2 and the cURL extension.)
Continue reading →
Oct 20, 2012 by Matt | Posted in Software & Scripts
The leading Twitter client for iOS just made its OS X debut on Thursday, and it has a very interesting feature. In the application’s preferences window, you can set the services that are used for URL shortening, image hosting, reading later, and so on. In addition to the usual suspects, you can choose “custom” as an option for image uploads.
Federico Viticci included a couple of PHP scripts in his review that interface with the Tweetbot uploader and save the image to either Rackspace Files or your own server.
Well, I didn’t want to be left out of the fun, so I wrote one for Imgur, the supremely famous image host that grew out of Reddit’s habit of using up other image hosts’ low per-image bandwidth allotments.
Continue reading →
Oct 24, 2011 by Matt | Posted in Coding, Featured
iOS has a simple event-based XML parser built in, which makes it fairly easy to do less involved parsing operations without having to load up a third-party framework. This tutorial will show you how to build a simple iPhone application that will download an XML feed from Twitter containing a user’s tweets, and then display them with a pretty UI. (You could easily adapt this to parse other XML documents, such as RSS feeds.)
Sep 5, 2011 by Matt | Posted in Design
Twitter has a new CSS framework, named Bootstrap, that they launched recently, which includes things like grids, custom form styles, tooltips and popovers, etc..
Bootstrap is a toolkit from Twitter designed to kickstart development of webapps and sites. It includes base CSS and HTML for typography, forms, buttons, tables, grids, navigation, and more.
It supports modern, standards-compliant browsers, but I imagine some of the niftier features would probably break down on older ones. That would be a big issue if you wanted to use Bootstrap for an ordinary website, but less so for “web apps,” where it’s more common to assume a user has a modern browser.
I haven’t tried Bootstrap yet, but you can give it a test run by hotlinking the 7kb minified CSS from their GitHub repository. Or download the LESS files from the repository if you want to customize it.
Bootstrap from Twitter [Twitter Developer Blog]