RE: Tumblr on Windows 8/WinRT

245 views
Skip to first unread message

Steven Pears

unread,
Oct 15, 2012, 1:56:47 AM10/15/12
to tumbl...@googlegroups.com
Hey Marco
 
I had a little trouble with the callback code, but it sounds like we’re both doing it the same way. An OAuth request to /request_token first, then the WAB GetCurrentApplicationCallbackUri method getting you the token details via the /authorize uri and the AuthenticateAsync method.
 
I know it sounds like you have already - but the first thing is going to be to double check that your OAuth app callback is registered as the exact WAB callback Uri in the Tumblr settings (including the final forward slash, a bad copy/paste caused me trouble with this one when I was discovering how it all worked!). I have different settings for my Win8 app than my WP7 app to do this
 
Unfortunately, it’s tricky to diagnose once it disappears into the WAB code. One thing I would say is to make sure you’re not running any network monitoring tools - I don’t know if there’s any custom setup required, but Fiddler caused my OAuth process to completely fail when I was using this method.
 
Other than that we’d be down to checking out the error’s call stack to see if we can see anything from the route the code has taken.
 
Sorry I can’t be of more help at the moment, right now the whole process does seem a little hit and miss for developers, which is a shame when a lot of the new .NET functionality is actually really helpful.
 
If you don’t want to post code/call stacks on the group - I’m happy for you to contact me off list.
 
Steven
 
Sent from Windows Mail
 
From: Marco Tagliaferri
Sent: ‎15‎ ‎October‎ ‎2012 ‎05‎:‎41
To: tumbl...@googlegroups.com
Subject: Re: Tumblr on Windows 8/WinRT
 
Hi Steven,

been working on a Windows 8 app myself, however I am having a bit of an issue when completing the OAuth process using the WebAuthenticationBroker class. I can successfully navigate to the tumblr login page, however when I click the "allow" button I get an error message.

I suspect tumblr is returning a 404 and WinRT is not liking it... I have tried various callback URLs, from WebAuthenticationBroker.GetCurrentApplicationCallbackUri() to a static URL all to no avail. Did you get this part working? Do you have any pointers?

Thank you very much!

Marco


On Wednesday, October 3, 2012 8:38:07 AM UTC-4, Steven Pears wrote:
Afternoon from the UK!
 
Having now released my C# API on Github, I'm looking at working on a Win8 app for Tumblr.
 
I'm having trouble using WinRT with raw C# right now, mainly because of the contract restrictions on WinRT types and all the fun that entails - the bottom line is I'm looking at porting the entire library over to WinRT - which should hopefully make my life a lot easier (if for no other reason that it does binary based url encoding!)
 
I'm expecting this to take a week or so to figure out - plus there's just a lot of code to move across, but I was curious if there were any other devs on the group who might be interested in using / testing this once I'm done?
 
If there is - I'll look at posting the initial draft into Github as well.
 
Thanks in advance
 
Steven

Blugrin Administration

unread,
Oct 15, 2012, 2:44:55 AM10/15/12
to tumbl...@googlegroups.com
Can I suggest that you use Fiddler (http://www.fiddler2.com to capture the raw packets... it's like opening your eyes... :)
--
______________________________________________________________________

Leading Batch/Bulk Editing tools for EtsyBETSI & BETSI Lite
Unique to BETSI: Up to 40+ Actions; Advanced Quick Search and Filtering; Review before Sending

Steven Pears

unread,
Oct 15, 2012, 2:47:54 AM10/15/12
to tumbl...@googlegroups.com
Have you had experience with getting Fiddler to work with Web Authentication Broker? as I mentioned Fiddler caused it to not work at all, but it works with all my urls once I'm authenticated, even with the Win8 loopback adapter set up for my app inside Fiddler WAB refused to serve the Tumblr authorization page.

Steven

Sent from my Windows Phone

From: Blugrin Administration
Sent: 15/10/2012 07:44

Blugrin Administration

unread,
Oct 15, 2012, 2:52:40 AM10/15/12
to tumbl...@googlegroups.com
Have you tried to contact the Author. He's was a Microsoft employee and his software was bought by Telerik - he now works for them. He's also got a book. I'm sure if you contact him, you'll get a response. Don't ask, don't get. :)

Graeme
Message has been deleted

Marco Tagliaferri

unread,
Oct 16, 2012, 12:42:06 AM10/16/12
to tumbl...@googlegroups.com
Thanks to both of your for your replies. I had tried Fiddler already with similar results to what Steven has experienced.

The good news is that I got it working. My problem was with the "oauth_callback" parameter in the initial POST to https://www.tumblr.com/oauth/request_token. I was double encoding the URL so at the end of the authorization process (after clicking the "allow" button to authorize the app) I was getting a 404 by Tumblr instead that of a redirect to my callback URL. As soon as I removed the extra encoding it worked.

Thank you very much for your help,

Marco

Steven Pears

unread,
Oct 16, 2012, 1:37:14 AM10/16/12
to tumbl...@googlegroups.com
Glad you got it sorted :)


Steven

Sent from my Windows Phone

From: Marco Tagliaferri
Sent: 16/10/2012 05:42
Reply all
Reply to author
Forward
0 new messages