title: Scribe Tumblr Response body is incorrect. Can't extract token and secret from this: 'Missing or invalid oauth_verifier.'
body: <p>I'm having problems with authenticating Tumblr using Scribe. I've followed an example that I found here on SO but I keep getting "org.scribe.exceptions.OAuthException: Response body is incorrect. Can't extract token and secret from this: 'Missing or invalid oauth_verifier.'"</p>
  
  <p>Any ideas? Help would be GREATLY appreciated! Thanks.</p>
  
  <pre><code>import android.app.Activity;
  import android.content.Intent;
  import android.net.Uri;
  import android.os.Bundle;
  import android.os.StrictMode;
  import android.util.Log;
  import android.webkit.WebSettings;
  import android.webkit.WebView;
  import org.scribe.builder.ServiceBuilder;
  import org.scribe.builder.api.TumblrApi;
  import org.scribe.model.*;
  import org.scribe.oauth.OAuthService;
  
  public class MyActivity extends Activity {
      private static OAuthService service;
      private Token requestToken;
      private Verifier verifier;
      private static final String PROTECTED_RESOURCE_URL = "http://api.tumblr.com/v2/user/info";
      private static Boolean authInProgress = false;
      public WebView TumblrWebView;
  
      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
          StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
          StrictMode.setThreadPolicy(policy);
  
          setContentView(R.layout.main);
  
          if ( ! authInProgress ) {
              authInProgress = true;
              service = new ServiceBuilder()
                      .provider(TumblrApi.class)
                      .apiKey("xxx")
                      .apiSecret("yyy")
                      .callback("thisapp://tumblr")
                      .build();
  
              // Obtain the Request Token
              Log.d("Tumblr", "Fetching the Request Token...");
              requestToken = service.getRequestToken();
              Log.d("Tumblr", "Got the Request Token!");
  
              Log.d("Tumblr", "Now go and authorize Scribe here:");
              Log.d("Tumblr", ""+service.getAuthorizationUrl(requestToken));
  
              Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse( service.getAuthorizationUrl(requestToken) ));
              startActivity(browserIntent);
          }
      }
  
      @Override
      protected void onResume() {
          super.onResume();
          if (this.getIntent()!=null &amp;&amp; this.getIntent().getData()!=null){
              Uri uri = this.getIntent().getData();
              if (uri != null &amp;&amp; uri.toString().startsWith("thisapp://tumblr")) {
                  verifier = new Verifier ( uri.getQueryParameter("oauth_verifier") );
                  // Trade the Request Token and Verfier for the Access Token
                  requestToken = service.getRequestToken();
                  Log.d("Tumblr", "Trading the Request Token for an Access Token...");
                  Log.d("Tumblr", " ---&gt; Request Token: " + requestToken.getToken());
                  Log.d("Tumblr", " ---&gt; Request Token Secret: " + requestToken.getSecret());
                  Log.d("Tumblr", " ---&gt; Verifier: " + verifier.getValue());
                  Token accessToken = service.getAccessToken(requestToken, verifier);
                  Log.d("Tumblr", "Got the Access Token!");
                  Log.d("Tumblr", "(if you're curious it looks like this: " + accessToken + " )");
  
                  // Now let's go and ask for a protected resource!
                  Log.d("Tumblr", "Now we're going to access a protected resource...");
                  OAuthRequest request = new OAuthRequest(Verb.GET, PROTECTED_RESOURCE_URL);
                  service.signRequest(accessToken, request);
                  Response response = request.send();
                  Log.d("Tumblr", "Got it! Lets see what we found...");
                  Log.d("Tumblr", ""+response.getBody());
  
                  Log.d("Tumblr", "Thats it man! Go and build something awesome with Scribe! :)");
              }
          }
  
      }
  }
  </code></pre>