Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6698605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:35:51+00:00 2026-05-26T06:35:51+00:00

I’m trying to implement the Tumblr API in an Android app. I’m really getting

  • 0

I’m trying to implement the Tumblr API in an Android app. I’m really getting stuck with authorizing a user so that they can do things such as post and view their dashboard. I don’t really understand oAuth, and the Tumblr API documentation sort of skips right over it. I have no idea if I’m supposed to prompt the user for their credentials, or what to do with those once I have them, or anything like that. I added the Signpost library to my project, but I’ve been scratching my head since then. Anybody familiar with oAuth on Android who would care to fill me in? Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T06:35:52+00:00Added an answer on May 26, 2026 at 6:35 am

    Yes, the documentation is not that good. You should first read about OAuth. Twitter has a good overview.

    First of all you need a consumer key and secret (you can get those by registering your app in tumblr). After that, you should use the auth URLs that Tumblr provides to get the authorization from the user. Usually you will generate a request URL, from which you can take the user to the browser where he/she will login and authorize your app. This will trigger a callback to your app, and you will be able to get the oAuth token. Save this in your app (SharedPreferences) so that you won’t need to ask the user again to authenticate. With this token you will be able to interact with Tumblr’s API that requires authentication.

    Note that you could also implement a webview instead of making the user use the browser. Though, this requires a bit more of work.

    I have found that the latest signpost library does not work well with Tumblr. You will need a bit older version. Head here and download these files:

    • signpost-core-1.2.jar
    • signpost-commonshttp4-1.2.jar (this is needed specially if you want to target pre-froyo devices)

    Import both libraries to your project. To use them, basically you need to call the following code:

    CommonsHttpOAuthConsumer consumer = new CommonsHttpOAuthConsumer(CONSUMER_KEY,
             CONSUMER_SECRET);
    CommonsHttpOAuthProvider provider = new CommonsHttpOAuthProvider(
             REQUEST_TOKEN_URL,
             ACCESS_TOKEN_URL,
             AUTH_URL);
    String authUrl = provider.retrieveRequestToken(consumer, CALLBACK_URL); 
    

    CALLBACK_URL could be something like this: “tumblrapp://tumblrapp.com/ok”. There is no need to set the callback URL on the Tumblr settings.

    Also, you will need to set an intent filter so your app gets called after authorization. Make sure that your Manifest looks like this:

                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
                <intent-filter>
                    <action android:name="android.intent.action.VIEW"/>
                    <category android:name="android.intent.category.DEFAULT" />
                    <category android:name="android.intent.category.BROWSABLE"/>
                    <data android:scheme="tumblrapp"/>
                </intent-filter>
    

    Now after authentication you can get the token like this:

    Uri uri = this.getIntent().getData();
    if (uri != null) {
       String token = uri.getQueryParameter("oauth_token");
    }
    

    I made a quick sample app. You can check it out here. You might want to move the request to a background thread as it will block the UI.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
I am using Paperclip to handle profile photo uploads in my app. They upload
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a jquery bug and I've been looking for hours now, I can't
I've got a string that has curly quotes in it. I'd like to replace

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.