sábado, 27 de octubre de 2012

Want To Read App.net Status Messages In The Official Twitter App? Here’s How With Apparchy

The great thing about San Francisco is that it's a small town in size. As I was walking to the office today I walked by uber-developer Steve Streza and we caught up on what he's working on lately. Yesterday, there was an App.net hackathon and Steve showed me what he made, and it's really cool. If you're unsure, App.net is a project that is kind of like Twitter, for those who don't want to necessarily be on Twitter. Kind of.

Without having to jailbreak your phone or anything, you can read all of your App.net statuses and submit your own using the official Twitter app. It's kind of handy, eh? He calls the hack Apparchy, and he's set up a site for it as well as a blog post.

If you're an App.net user and would like to do this, I figured I'd post the steps to make it happen here via Steve himself. It works for the official Twitter app on iPhone and iPad.

———
How to setup:

1) Sign up for a free account on the Apparchy website
2) Add your app.net account
3) Open Twitter.app for iPhone or iPad
4) Add an account
5) Enter the username/password you used to sign up on the Apparchy website (not your app.net credentials)
6) Tap the gear icon on the login screen
7) Under "API root", enter: https://apparchy.net/api/
8) Log in

You will then see app.net data loaded into Twitter.app.

You can:

- view the stream of people you follow
- view the stream of your mentions
- view user profiles, including your own
- view follower/following lists for a given user (e.g. view people who follow @dalton or people who @gruber follows)
- view entire conversations
- view how many stars and reposts a given post got
- search for users
- pull to refresh and infinitely scroll
- create new post or reply to other posts
- star or repost
- follow or unfollow

Some caveats:

- if you have a Twitter account and an App.net account with the same username, if you relaunch the Twitter app, it will get confused and forget your proxy. So you will have to remove the Twitter account to make this work (usually by disabling Twitter.app from having access to system-wide Twitter accounts in Settings > Twitter).
- location data does not get included when posting
- photos cannot be posted through the app
- URLs in posts will be added to the beginning of the post, and sometimes aren't tappable
- you cannot view who starred or reposted a post
- you cannot post something > 140 characters
- search and the discover tabs don't really work
- Twitter crap like promoted tweets and who to follow and stories don't work
- nothing will appear in the Interactions tab except for mentions (so no repost or star notifications)

How it works:

A request through the Apparchy API consists of three steps – checking the authorization, calling the app.net API, and transforming the response. Apparchy implements Twitter's OAuth 1.0a scheme, and sends all data over HTTPS, so requests are as secure as calls to the Twitter API. From this we get the App.net credentials from a database, and make the appropriate call to app.net (so a call to the "mentions" API on Twitter calls the appropriate API for app.net's "mentions"). Once it has the response, it transforms the response from what the app.net API returns into what the Twitter API returns, pulling data from one and putting it into the other.

The result of this is the Twitter app sends a request in a certain way, and expects a response in a certain way. Apparchy implements an API that understands how the Twitter app sends requests, and understands how to give something back the Twitter app expects its response. Since Twitter has no idea something is sitting in the middle, it thinks what it's getting back are tweets, so it happily shows them.

———

There you have it App.net fans, go ahead and tweet to your App's content. Pretty genius, Steve.

[Photo credit: Flickr]

No hay comentarios:

Publicar un comentario