Home | Random | Downloads | About | Hikes | WebCam | Search | Sitemap | Email | Feed

bye, bye, Miss Deprecated API

bye, bye, Miss Deprecated API

After my horrible experience with Cleat last year I'm finally pulling the plug on my remaining Twitter API projects. Twitter is switching off their v1 API soon and I'm still so sick of it that I'm not even going to upgrade existing products. If you used Follower then I'm sorry. If you liked my Twitter public timeline screensaver then you're odd, but I'm still sorry. I'll still tweet, I'm just staying clear of the API.

(Image is Fail Whale Pale Ale by Brian Cook.)

Share:

I can't post a single photo

I can't post a single photo

You'd think Facebook or Twitter could scrape together a semi-functional Android client but apparently not.

Twitter has some size limit for photo uploads. In a sane world the client would resize a photo that was too large and just get on with it. Table stakes would be an error message. But no, it pretends everything is just peachy and then fails to upload. To post a photo to Twitter I have to remember to go into the camera settings and ratchet down the megapixels which I remember to do about never. 

Facebook used to work occasionally but now just dumps an ugly immobile progress bar that won't go away until I reboot the phone. 

Google+ probably works fine technically but if a photo is uploaded to a forest and there is nobody there to see it is that still in any sense counted as success?

Share:

Reviews and Links for August 2012

The Last Policeman by Ben H. Winters

The Last Policeman by Ben H. Winters

5/5

Stonking police procedural set in the months leading up to a global catastrophe.

 

Kill Decision by Daniel Suarez

Kill Decision by Daniel Suarez

5/5

Excellent techno-thriller. A little more serious and focused than Daemon and Freedom (TM). It's about a worst case drone scenario, ants, extra-special forces and some smart birds. Very good.

 

Links

Windows 8, Users 0? http://t.co/966Cuwjz

Bill Nye declares Todd Akin "fucking idiot"; issues debate challenge http://t.co/AZ3k55Y4 #fb

ITHCWY: Fight Facebook with Email: I was a little saddened to read today that Diaspora is transitioning over to… http://t.co/2G0pDdu0

Diaspora Founders To Move On, Handing Over Decentralized Social Network ‘To The Community’ http://t.co/KQGb2kpv -- sad, but not the future

RT @MargaretAtwood: Just used http://t.co/Nhna2CGO for gruesome printer problem: excellent, done in 10 mins! Tks to S H E F I N. Website ...

Check out Catfood Earth Live Wallpaper on Google Play! https://t.co/NTJQ1sYL

ITHCWY: Twenty-Four Hours with Twilio: I've wanted to play with Twilio's voice and SMS service for a while and… http://t.co/KOK0PG2M

Tuesdays http://t.co/BLNiCP3H

Twitter Cuts Off Tumblr's Ability to Find Friends http://t.co/1g3ZcClf

5 of 5 stars to The Last Policeman by Ben H. Winters http://t.co/9NF2nviH

XML: http://t.co/VadVt321 #rofl

Windows 8 Is Now Available For Developers (And For Everybody Else, There’s A 90-Day Free Trial, Too) http://t.co/iu1li6BV

Gotye's YouTube orchestra remix of "Somebody That I Used to Know" http://t.co/OUEXXltQ

ITHCWY: City by the Bay: View from Bernal Hill this afternoon. http://t.co/11cI3ctk

Nice panorama! Curiosity rover: Martian solar day 2 #360pano http://t.co/w1H2ocUm via @360cities

ITHCWY: Share a picture in MonoDroid: Here’s how to share a picture to Facebook, Twitter and so forth from… http://t.co/pByzvjmx

5 of 5 stars to Kill Decision by Daniel Suarez http://t.co/TKgUMNW0

BBC News - Mars rover makes first colour panorama http://t.co/fZ7u8smZ

How Apple and Amazon Security Flaws Led to My Epic Hacking http://t.co/BDmRAbm3

Via KQED Guides: Guide to Bay Area Tidepools: Where to Explore Amazing Marine Life | http://t.co/TDBRDnTD #todo @myEN

ITHCWY: Catfood: WebCams for Android: I’ve just released a WebCam app for Android. It’s based on WebCamSaver but… http://t.co/azZUwkkz

Pay for a new social network with no ads? https://t.co/2tox3c2y Anyone I know going to be on there? #fb

Curiosity http://t.co/D2cyWE66

BBC News - Photo shows Mars rover descent http://t.co/KfOv1qOF

Catfood WebCams for Android - Catfood Software http://t.co/VzeySq90 via @CatfoodSoftware

Check out Catfood WebCams on Google Play! https://t.co/VTU8YiBd

ITHCWY: Not a Private Key: When jarsigner says "Key Associated with [alias] not a private key" it almost certainly… http://t.co/3sk89ENV

ITHCWY: Sending email via GMail in C#/.NET using SmtpClient: I’ve stubbed my toe on this a couple of times, so here… http://t.co/QJ7YjcjI

Help end patent litigation insanity and tell your congress person to back SHIELD. http://t.co/27anadBt

ITHCWY: Support SHIELD–a small measure of patent sanity: A friend pointed me at the SHIELD (PDF) act today. This… http://t.co/ArXHgZ0e

ITHCWY: Thank you for choosing HSA Bank!: No, thank you HSA Bank for not giving me a choice and then cheekily… http://t.co/9torSXCq

Bill would force patent trolls to pay defendants’ legal bills | Ars Technica http://t.co/poB3zzlX +1, via @sr00t

What a happy coincidence. As well as #IPAday it's also goof off at work day: http://t.co/7AItItWq

Apparently it's #IPADay - luckily there's some @21stAmendment in the fridge. http://t.co/jyYPSePC

Share:

Fight Facebook with Email

I was a little saddened to read today that Diaspora is transitioning over to some form of community manged slow death. I joined a pod a while back and was pretty impressed with the design. It was very similar to Google+: clean, nice features, nobody home. 

I've also joined app.net. The concept here is a social network that you pay for, so the owners are aligned with the interests of the users and developers rather than advertisers and lame brands. I wish app.net well, but it's not the future. Best case (and it's not a bad one) it could be the new WELL - a community that people care enough about to pay for (I was on the WELL in the early 90's, splitting the tab with a friend so our handle was abft, account built for two). If that is the direction it goes in then simply having a slightly longer post limit than Twitter isn't really going to cut it. And cool as it might be most people aren't going to pay for a social network. 

Any attempt to displace Facebook has to solve the problem that anyone interested in sharing anything with anyone else is already using Facebook. The only platform that is in any sense comparable is email. So someone needs to make email into a social network.

This could be an interesting startup. Create some account - [email protected] - anything you send directly to that address is a post. Anyone you copy is a mention. Reply to a thread with this email address included and you're replying on the social network as well. Anyone copied on such an email gets invited to the network if they're not already.

You've got a killer viral component and an instant social network that is supported on every platform with no investment needed. Everyone has email, and everyone is a member as soon as they claim their email address or get included in a post. 

Maybe someone has tried this already and I just haven't seen it. I'm half tempted to have a crack at it myself. 

What would be more interesting would be layering a social protocol over email, and implementing that protocol by proxy on top of email providers that don't or won't support it. This creates a core social service practically out of thin air. Facebook and Twitter are the new AOL and CompuServe. There has to be a way to leverage email into a free and open alternative.

Share:

Share a picture in MonoDroid

Here’s how to share a picture to Facebook, Twitter and so forth from MonoDroid:

Java.IO.File cache = ExternalCacheDir;
if ((cache == null) || (!cache.CanWrite()))
{
    // no external cache
    cache = CacheDir;
}

Java.IO.File tempFile = new Java.IO.File(cache, "temp.jpg");
using (FileStream fileStream = File.OpenWrite(tempFile.AbsolutePath))
{
    _currentBitmap.Compress(Bitmap.CompressFormat.Jpeg, 85, fileStream);
}

Intent shareIntent = new Intent(Intent.ActionSend);
shareIntent.PutExtra(Intent.ExtraStream, Android.Net.Uri.FromFile(tempFile));
shareIntent.PutExtra(Intent.ExtraText, "Some text - appears in tweets, not on facebook"));
shareIntent.SetType("image/jpeg");

StartActivity(Intent.CreateChooser(shareIntent, "Share Image");

A fun mix of Java and C#. The directory got me to start with so check to see if the ExternalCacheDir is available and if not fall back to the internal CacheDir. Frustratingly Facebook doesn’t pick up on the text associated with an image regardless of the intent ExtraWhatever specified.

Share:

Twitter's API has got too painful for me

Twitter's API has got too painful for me

I've developed a bunch of stupid, niche and vaguely promising apps on top of the Twitter API. During that time I've slogged through various painful and rapid shifts like changing IDs, authentication schemes and diktats handed down on which parts of the ecosystem Twitter would like to control. I've had to roll my own OAuth and even re-word a blog post to Twitter Support's satisfaction to get a blocked application unblocked again. It's been a pretty frustrating experience but worth rolling with the punches until the past week.

Twitter suspended Cleat, a tool for posting from the command line. So I emailed to ask why, too much effort for them to explain the rationale at the time they're putting the suspension in place I guess. I got an auto-response asking for information they must have already had and I replied to this. A few days later I still hadn't heard back so I emailed again and the ticket had been automatically closed. 

So far just the standard fuck-off-and-die support that you'd expect from a growing company that no longer wants to talk to it's users. But the auto-reply directed me to https://support.twitter.com/forms/ to file a new ticket. None of the options there relate to developers or a suspended application. I tried filing a ticket under 'deactivated account' which seemed the closest.

That form has a hard-coded 'With love,' valediction. Whoever thought that was cute should go through the process of trying to get help a few times. 

This attempt auto-responded to say that my account was not suspended, and would I like to fuck-off-and-die or got back to the forms center?

So I tried another form that actually seemed to submit but haven't heard anything back.

I'd be happy to update my software if I know which vague shifting facet of the Twitter terms of use I'd fallen foul of. Or at least I would have been. I'm just so sick of it that I've pulled Cleat and I'm done with any more personal projects that use the Twitter API. 

Share:

Catfood: Cleat 1.10

I've just released an updated version of Cleat that supports geolocation and timestamps. Cleat is my Windows command line client for Twitter.

Share:

Carr is Wrong: Costolo is Wrong: Wikipedia’s SOPA Blackout is a Great Idea

I was very happy to see TechCrunch 2.0 launch today as Pando.

Much less happy with Paul Carr’s applause of Dick Costolo’s tweet that Wikipedia's support of Internet Blackout Day is “…just silly. Closing a global business in reaction to single-issue national politics is foolish”.

Possibly a smart position for Twitter. It would be expensive to shut down for a day, and it’s hard to infringe copyright in 140 characters so of the many sites that depend on user generated content Twitter could very well be the least likely to fall foul of SOPA/PIPA.

Carr says:

And, you know what? He’s right. Whatever your stance on SOPA, closing down a global business to protest an American law is foolish.

It happens to be an American law that seeks to unplug foreign sites from the Internet, even if they’re not breaking any local laws. And then:

Arguing that a one-day closure reminds everyone of the importance of net freedom is like burning down one church to underscore the importance of the First Amendment for all of the others.

Really? Nobody is burning down anything. But if there was a potential law that allowed churches to be repossessed, say on the basis of claims of false scripture from other religions, without requiring a trial and say with a specific exemption that no legal challenge could be brought against any repossession made in ‘good faith’ compliance with the law then it might be worth it for a church or two to self-immolate.

And then:

The trouble with taking a political stance on one issue is that your silence on every issue becomes a stance.

There’s a difference between fighting an existential threat and throwing in the towel on neutrality. I’m very glad to see Wikipedia join the blackout.

Share:

Catfood: Cleat

Need to tweet from the Windows command line? Well, now you can…

Share:

Android: Insane Contacts Storage

Oh no:

Low on space (Android)

My phone keeps running out of space. A little sleuthing under Manage Applications shows that Contacts Storage is using over 32MB. Can’t move it to the SD Card – I guess this makes sense, although it would be nice to cache some of the non-essential data there. I’ve no idea if this is a HTC problem or an Android problem (I have a HTC Aria), but some Googling would seem to indicate that it’s not uncommon.

In the People app choosing View from the menu allows you to pick which sources to use to display contacts. I had 5,854 contacts from Twitter, despite having configured the Twitter app to only sync with existing contacts. I also had a bunch of Facebook contacts, with the same configuration (existing contacts).

I tried deleting Twitter from Accounts & Sync. This warned that it would remove contacts (great!) but after blowing it away Contacts Storage had more than doubled to over 70MB.

Time to go nuclear. I backed up existing contacts and then deleted all data from Contacts Storage. My phone is happy again.

Contacts and sync in general is the worst part of the Android experience. HTC Sync is a contact-duplicating, pop-up-and-wave-my-arms-in-the-air-every-time-I-do-anything piece of Adobe Air uselessness. Google really needs a better answer for people who live in Outlook on the desktop. Or maybe they’ll eventually grind me down into GMail…

Share:

Twitter: Put some status in status updates

Paragraph Symbol

Give me an extra character for every year that I’ve been with Twitter.

Another extra character for every tweet that gets retweeted more than a couple of hops outside my social circle.

Ten more characters if I #AskObama and he answers.

Etc.

Share:

Circles

 A Circle

I just got on Google+, and the Circles concept definitely moves the ball forward, but my heart sinks a little at having yet another disconnected social identity. It’s been said before, but it’s worth saying again – social networking needs to be an open, core internet standard like email. You can live on Facebook, Google, Twitter, wherever but your social graph should be independent of any specific service.

I don’t mean this in any (well, OK, a little) granola crunching open source way. Companies should compete to the death on their social graph implementation and added value. But the actual data on who your friends are should belong to you and should be both portable and interoperable. I should be able to friend someone on Google from within Facebook and share core items in both directions. If I get fed up of Facebook I should be able to move my graph and central identity elsewhere.

We’ve got OpenSocial, strangely not mentioned in the same breath as Google+, and Open Graph which is open for things but not people. Also FOAF, XUP, and other possible foundational standards. Of course the barriers here aren’t technical.

Altly wants to be Pepsi to Facebook’s Coke. I’m waiting to see what it tastes like, but it doesn’t sound like they’re itching to change the game.

Diaspora is an interesting project, but running instances (pods) of a social network is the wrong level of abstraction.

Of course ‘owning’ the graph is tremendously valuable and it’s hard to see Facebook giving this up anytime soon. If Google really don’t want to be evil they should use Google+ to liberate us from the tyranny of walled social gardens. Unless it turns out to be another Buzz or Wave in which case it’s down to us.

Share:

Zombie Robs

I use Facebook for people I know well, LinkedIn for weaker ties and Twitter mostly for people I don’t know at all.

Over time though I’ve created identities on pretty much every network. With the increased interconnectedness of such sites when I stop using them I don’t stop posting…

I just discovered (in a spam filter) that someone was having a one sided conversation with me on Plaxo Pulse. I’m also actively posting (but not paying attention) on Buzz and goodness know how many other networks. I’m sure this inflates their active user count admirably but I’m now worried that undead me is being rude.

The social graph needs to work better in the other direction. Everything I post and comment on syndicates out like crazy but keeping track of responses just isn’t working.

Share:

Loose Lips...

LooseLips

Share:

Space and multibyte character encoding for posting to Twitter using OAuth

I've spent the last day learning how to use OAuth and XAuth to post to Twitter. There are rumblings that Twitter will start to phase out basic authentication later this year, and more importantly you can only get the nice “via...” attribution if you use OAuth (for new apps, old ones are grandfathered in).

I coded up my own OAuth implementation, referring to Twitter Development: The OAuth Specification on Wrox and the OAuthBase.cs class from the oauth project on Google Code. Both are great references, but both fail with multibyte characters. The problem is that each byte needs to be separately escaped. OAuthBase.cs encodes characters as ints rather than breaking out the bytes and the Wrox article incorrectly suggests using Uri.EscapeDataString(). 

Here's a method to correctly encode parameters for OAuth:

public static string OAuthUrlEncode(string s)
{
    if (string.IsNullOrEmpty(s))
    {
        return string.Empty;
    }
    else
    {
        StringBuilder sb = new StringBuilder(s.Length);

        for (int i = 0; i < s.Length; i++)
        {
            if (NoEncodeChars.IndexOf(s[i]) == -1)
            {
                // character needs encoding
                byte[] characterBytes = Encoding.UTF8.GetBytes(s[i].ToString());
                for (int b = 0; b < characterBytes.Length; b++)
                {
                    sb.AppendFormat(CultureInfo.InvariantCulture,
                    "%{0:X2}",
                    characterBytes[b]);
                }
            }
            else
            {
                // character is allowed
                sb.Append(s[i]);
            }
        }

        return sb.ToString();
    }
}

NoEncode chars is a list of the permitted characters:

private const string NoEncodeChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.~";

An impact of this encoding is that spaces must be encoded as %20 rather than plus. I was worried that each space would end up counting as three characters towards the 140 character limit. I tested this and it isn't true, so use HttpUtility.UrlEncode() to calculate the number of characters in the post OAuthUrlEncode() or similar to actually encode post parameter.

Share:

I Thought He Came With You

Robert Ellison's Blog

7,250,102,861 people still need to read this blog.

Expert

Expert