Tag Archives: twitter

Why Twitter’s New “More Visual Tweets” Are a Bad Idea

Starting this week, your Twitter feed is going to look a lot different. In their infinite wisdom, the social media titan has decided that their media previews should now be expanded by default in their web interface and iOS app. (You can disable it in the iOS app, but not on the web.) So if someone links to an image, you now get a Facebookesque image embedded in the tweet. Ditto for those silly looping videos from Vine.

I have a problem with this. A change, even one so deceptively small as this, can drastically alter how a social networking site is used.

Look at Facebook, for example. I don’t know about you, but my feed is an endless sea of images, with a rare plain-text status. It’s gotten to the point where if you want to say something and be heard, you have to set your text on a picture. Otherwise people will just scroll right past it, the visual noise drowning out the text. Photos, image macros and paragraphs of (frequently trite) text needlessly pasted into graphics that add next to nothing to the message.

Google+ has been even worse of late. If you join any of the “communities” Google recommends to you, even seemingly professional ones such as those for programming topics, you’re going to be seeing a lot of animated GIFs and image macros. (Or “internet cancer,” as I’ve heard them described: low-effort content that spreads across the Web, choking off interesting, insightful and informative content.)

I love words. I use Twitter because I want two things:

  1. A compact and scannable feed of short messages. The “stream of consciousness” that Twitter is famous for. Interesting things that don’t quite merit their own full-length blog posts.
  2. Links to long form articles recommended by the people I follow.

The addition of embedded media will be to the detriment of Twitter. It will encourage more image links and, potentially, tweets that solely consist of an image.

The change is already starting. On day one, I saw this:

What are you thinking, Harper Collins?

I don’t even follow @HarperCollinsUK, it was retweeted, and I’m certainly not a C. S. Lewis fan. But here’s the same kind of junk, straight out of Facebook, showing up already. I guess it’s time to brace yourselves, because the image macros are coming.

Image Macros are Coming

Custom JavaScript Twitter Widgets in an API 1.1 World

My Twitter WidgetContinuing their gradual shutdown of old APIs (following the launch of version 1.1 of their API), Twitter recently pulled the plug on their old-style widgets and the unauthenticated search API. This means if you had a fancy custom-designed JavaScript widget to show off your latest tweets, it’s not going to work anymore. The only officially supported options are the new widgets or a server-side solution with OAuth authentication.

What can you do if you don’t like either option?

Jason Mayes hacked together a clever bit of JavaScript that loads up one of the new Twitter widgets, scrapes the content out, and reformats it into nicer unstyled HTML. Then you can style it however you want in your stylesheet.

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.

Post to Twitter From a PHP Script: 2013 Edition

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.)

Download tmhOAuth

Continue reading →

Adding Imgur Support to Tweetbot for Mac

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 →

Twitter API Terms Revision Ignites Controversy

Twitter recently announced the next version of the REST API that powers the many apps that hook into the popular social media service, a move which sparked much criticism among users and developers alike. Some of the changes include:

  • Every API endpoint will require authentication, through OAth
  • Rate limiting is done per endpoint
  • The revised display guidelines will be more actively enforced. They want a more uniform style.
  • Developers will have to “work with Twitter” if they have more than an arbitrary number of users. As an app developer, you will need “[Twitter’s] permission if your application will require more than 100,000 individual user tokens.” Applications that already have over 100,000 tokens will have their fuzzy limit set at 200% of their current token count.

The last point, especially, has been controversial, as it seems suspiciously like a ploy to disadvantage third-party Twitter clients and push users toward the official app. Whether that is the case or not, it could conceivably inconvenience the developers of popular apps like Tweetbot and Echofon.

Hopefully things will work out okay. Twitter’s own app is utterly mediocre in comparison to the better third-party clients, chiefly Tweetbot. Twitter would be shooting themselves in the foot if they put the kibosh on the software that some of the more influential users prefer. Third-party clients are what made Twitter what it is today, after all.

Twitter Launches “New New Twitter” and Ruins iOS App

Starting Thursday, Twitter began rolling out their latest redesign, dubbed “New New Twitter” by users. The new design looks okay, albeit a bit heavy on the boxes, but some of the changes it brings aren’t so welcome. It seems to me as if Twitter is slowly strangling the brilliant simplicity that made it unique and successful, and making the service more and more like Facebook.

The first change that irks me is the new Connect screen, which replaces the Mentions tab. Instead of getting a listing of replies or tweets mentioning your username, you get something closer to a Facebook feed. The stream is cluttered with messages along the lines of “Mr. Follower and 6 others are now following you. Isn’t that great?” Oh, and anytime someone retweets one of your updates, it goes in there too. You can still get to the Mentions timeline, but it requires a second click. I imagine it’s even more “useful” if you have a half million followers.

Continue reading →

Building an iPhone App to Parse the Twitter API with NSXMLParser

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.)

Continue reading →

Twitter to Wrap All Links with t.co Starting in October

According to the Twitter developer documentation, Twitter plans to start wrapping all links with their t.co shortener starting in October. Currently, only ones over a certain length are wrapped.

So if you’re like me, and have a personal URL shortener that generated smaller links than t.co, you probably think this move is a little silly.

On the plus side, Twitter.com and the official Twitter clients (as well as any that use the right API methods) automatically expand all t.co links and display the URL they point to. So users should optimally never see the t.co URLs at all. If you continue to use your own shortener, it’s URLs will be re-wrapped, but users will still see your link.

Developers should check out the t.co URL Wrapper documentation page, as well as the wrap_links parameter in the statuses/update API method.

Bootstrap: Twitter’s CSS Framework

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]

Adding and Tracking Social Buttons

It seems like every website has social media buttons on them now. The ones leading the pack of late seem to be Twitter, Google +1 and the Facebook Like widget. This introduces one problem: loading times. Your pages are calling JavaScript files hosted on remote servers, bogging them down a bit.

Joost de Valk has put together a good tutorial on how to fix that issue. It features code snippets that will load the widget JavaScript asynchronously, keeping the buttons from holding up the page loading. Also, it even adds Google Analytics and Clicky tracking so you can tell if people are actually using your buttons.

When Google released +1, I quickly identified how to track interaction with that button. The obvious “follow up” was questions from people on how to track interaction with other buttons. Not for each of these social buttons tracking of interaction is actually possible. It depends on how the button was designed whether this will work or not. I got it working for Twitter and Facebook, so I’ll share the code for tracking interaction with their respective social buttons below.

Social Buttons: Adding them to your site & Tracking them [Yoast]