Generate twitter links using postgr.es instead of bit.ly
authorMagnus Hagander <magnus@hagander.net>
Mon, 28 Mar 2011 15:17:28 +0000 (17:17 +0200)
committerMagnus Hagander <magnus@hagander.net>
Mon, 28 Mar 2011 15:17:28 +0000 (17:17 +0200)
posttotwitter.py

index 9e697b272af912e95af490d58bdb267f0679c0fc..d273a799e6e98e359b50df1ba8a737fb6622c3f6 100755 (executable)
@@ -60,7 +60,7 @@ class PostToTwitter(TwitterClient):
                                # to twitter, and we store it separately in the database
                                # in case it's needed.
                                try:
-                                       short = self.shortlink(post[2])
+                                       short = self.shortid(post[1])
                                except Exception, e:
                                        print "Failed to shorten URL %s: %s" % (post[2], e)
                                        continue