spacer

chrome Posts

spacer

Post To Tumblr 5

18 08 , 2014 No Comments Share

Almost exactly 6 months ago I released Post To Tumblr 4 and today im proud to have pushed the 5th version of my popular Chrome Extension to the Chrome app store.

About a week ago Tumblr decided to change its security model which meant that my 34,000 ish users were now stuck. Unfortunately to get PTT to work required an entire rewrite of the way I handled users and posting to tumblr. Under the pressure of from tons of emails from angry users every day I set to work restructuring it all.

Now with version 5 users must authenticate with my backend:

spacer

Then they can add one or more tumblr accounts to the PTT account:

spacer

Which then seamlessly integrates into the app:

spacer

The backend authenticates the tumblr accounts and stores the oauth access keys so that it can make calls to tumblr on the user’s behalf in the future. Its a much simpler system than I had previously, and it allows for multiple tumblr accounts which has been requested many times in the past.

The backend is built upon parse.com’s cloud service. Its pretty much a hosted node.js environment but I really like it because its really fast and easy to work with and has a very generous free tier spacer

spacer

I wrote the entire backend using Typescript which compiles down to JS which runs on parse, so that means that the entirety, client and server of Post To Tumblr is written in Typescript. A great feeling and utility as it allowed me to share code between the client and server.

I have an almost complete Parse.com type definition file now, surprisingly it isnt actually available on DefinitelyTyped but when I get round to it ill upload it myself.

In addition to the backend changes I totally restructured most of the client to use requireJS for nice modular JS loading. Im much happier with the structure of the client as a result and it feel less like guesswork and global-variable-spaghetti!

I hope my users enjoy it!

PostToTumblr v3.18 – Fixed Tumblr oauth change

05 03 , 2013 4 Comments Share

spacer

 

Just a quick update to say I have now fixed the authentication issue my PostToTumblr that quite a few people contacted me about.

What was going on was that Tumblr appear to have changed the format of the data they return from a token request which was causing a library that PostToTumblr relies on to fail.

Before PostToTumblr can post content on a users behalf it first must get an “access token”. This token is given to PostToTumblr as part of the authentication flow.

When PostToTumblr first starts up it checks to see if it still has a valid token (they can expire over time and other various reasons). If it doesnt it must go through the authentication flow. Firstly it redirects the user to the grant permission dialog:

spacer

When the user clicks allow Tumblr then returns an “oauth token” and an “oauth verifier” to PostToTumblr, which it can then use to get an “access token” which is used to do the posting.

The problem that this update fixed was that the “oauth verifier” that was returned from Tumblr changed:

spacer

You see at the end of the query string there is now a “#_=_” well this was causing havoc with the URL parameter parsing code in the Google oauth library I was using.

My solution is quick and dirty, just strip out the “#_=_” from the url while parsing:

// MIKE HACK!!	  
if(param.indexOf('oauth_verifier=')!=-1) 
{
	param = param.replace('oauth_verifier=','');
	param = param.replace('#_=_','');		  
	decoded['oauth_verifier'] = ChromeExOAuth.fromRfc3986(param);
}
else
{	  	  
	var keyval = param.split("=");
	if (keyval.length == 2) {
		var key = ChromeExOAuth.fromRfc3986(keyval[0]);
		var val = ChromeExOAuth.fromRfc3986(keyval[1]);
		decoded[key] = val;
	}
}

Well I hope this helps anyone else that may encounter this issue too!

Post To Tumblr v3.13

20 01 , 2013 14 Comments Share

spacer

Just a quick update to my Chrome Extension PostToTumblr this morning to fix a few things and add a couple of features after the large update in v3.12.

The change log:

- v3.13 -- 20/01/13 
+ More one-click options for post state, tags and caption
+ New button in the options for resetting Tumblr auth
+ New button for formatted posts for posting to draft
+ Fixed it so you no longer have a menu on one-click if you only have one blog
+ Correct verbs are now displayed in the desktop notifications when posting
+ Fixed an issue with white pages if you rename your blog
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.