logo
down
shadow

Tumblr API - Jumblr for Android [OAuthConnectionException]


Tumblr API - Jumblr for Android [OAuthConnectionException]

Content Index :

Tumblr API - Jumblr for Android [OAuthConnectionException]
Tag : android , By : Jet Thompson
Date : November 25 2020, 07:27 PM


Comments
No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

Can't find .jar file for jumblr (Tumblr android wrapper)


Tag : java , By : yarry
Date : March 29 2020, 07:55 AM
wish of those help From the GitHub README

Getting html of tumblr post using jumblr


Tag : android , By : lietkynes
Date : March 29 2020, 07:55 AM
it fixes the issue I am developing my first Android application using the "jumblr" library to get the last post of a blog and then do some stuff. , I solved the problem casting the post to a TextPost.
List<Post> posts = client.blogPosts("blogname.tumblr.com");
String post = (TextPost)posts.get(0).getBody();

Jumblr Implementation android


Tag : android , By : Funkwarrior
Date : March 29 2020, 07:55 AM
hop of those help? to Clinkz. Its pretty forward up there in these links but if still someone is having issue , this is the code which I used in my Android app and its working fine. For Android at 1st we have to add these two line in app level gradle file:
implementation 'com.daksh:loglr:2.1.4'
private void loginToTumblr() {

       Loglr loglr = Loglr.INSTANCE;
       if(loglr != null) {
           loglr.setConsumerKey("TUBMLR_CONSUMER_KEY"); // Replace with your App's Key
           loglr.setConsumerSecretKey("TUBMLR_CONSUMER_SECRET"); // Replace with your App's Key
           loglr.setUrlCallBack("https://www.callback.com/"); // Replace with your App's Callback
           loglr.setLoginListener(new LoginListener() {
               @Override
               public void onLoginSuccessful(com.tumblr.loglr.LoginResult loginResult) {
               String oAuthToken = loginResult.getOAuthToken();
               String oAuthTokenSecret = loginResult.getOAuthTokenSecret();
               Log.w(TAG, oAuthToken + "\n" + oAuthTokenSecret);                   
               shareOnTumblr(oAuthToken , oAuthTokenSecret);
               }
           });
           loglr.setExceptionHandler(new ExceptionHandler() {
               @Override
               public void onLoginFailed(RuntimeException e) {
                   Log.e(TAG, "Loglr Exeception: " + e.getMessage());
                   Toast.makeText(this, "Sorry! can't login to the tumblr.", Toast.LENGTH_LONG).show();
               }
           });
         loglr.initiate(this);
       }
       else
           Toast.makeText(this, "Something went wrong while Loggin in to Tumblr.", Toast.LENGTH_LONG).show();
           }   
private void shareOnTumblr(String token, String tokenSecret) {

          IResult iResult = new IResult() {
              @Override
              public void onSuccess(String result) {
                  loadingBar.hide();
                  Toast.makeText(this, result, Toast.LENGTH_LONG).show();
              }

              @Override
              public void onError(String error) {
                  Toast.makeText(this, error, Toast.LENGTH_LONG).show();
              }
          };

          String caption   = "IMAGE CAPTION GOES HERE";
          String imagePath = "IMAGE PATH GOES HERE"; //It must a String

          String params[] = new String[]{token, tokenSecret , caption, imagePath};
          new TumblrPostAsyncTask(iResult).execute(params);
       }
public static class TumblrPostAsyncTask extends AsyncTask<String, String, Boolean> {

            IResult iResult;

            TumblrPostAsyncTask(IResult iResult){
                this.iResult = iResult;
            }

            @Override
            protected void onPreExecute() {
                super.onPreExecute();
            }

            @Override
            protected Boolean doInBackground(String... params) {
                boolean result;
                try {
                    JumblrClient client = new JumblrClient("TUBMLR_CONSUMER_KEY", "TUBMLR_CONSUMER_SECRET");
                    client.setToken(params[0], params[1]);

                    PhotoPost post = client.newPost(client.user().getBlogs().get(0).getName(),PhotoPost.class);
                    Log.w(TAG, params[2] + " " + params[3]);
                    post.setCaption(params[2]);
                    post.setData(new File(params[3]));
                    post.save();
                    result = true;

                } catch (Exception e) {
                    Log.w(TAG, "Tumblr's Error: " + e.getMessage());
                    result = false;
                }

               return result;
            }

            @Override
            protected void onPostExecute(Boolean success) {
                super.onPostExecute(success);
                Log.w(TAG, "On Post Execute: " + success);
                if(success)
                    iResult.onSuccess("Successfully Posted on Tumblr.");
                else
                    iResult.onError("Sorry! couldn't Post on Tumblr.");

            }
        }
public interface IResult {

    void onSuccess(String result);
    void onError(String error);

}

Get "is_nsfw" flag from jumblr client for a tumblr blog


Tag : java , By : mux
Date : March 29 2020, 07:55 AM
I hope this helps . So, turns out this really is not supported by the JumblrClient, currently.
If anyone else stumbles across this until it is resolved in a new version, I now ended up getting that info by querying directly via api.tumblr.com/v2/blog/{blog-identifier}/info?api_key={key} as described here https://www.tumblr.com/docs/en/api/v2#blog-info

Android-Tumblr API - Jumblr for Android [OAuthConnectionException]


Tag : android , By : Milander
Date : March 29 2020, 07:55 AM
Related Posts Related QUESTIONS :
  • Koin: NoBeanDefFoundException, Check your module definitions
  • How to Ensure View is Removed After Animation on repeated touches
  • Differentiate ambiguous Extensions in Kotlin
  • Firestore how to putExtra object using Geopoint
  • Apple Maps and Google Maps API feasibility
  • Jetpack Navigation: Hide label in toolbar
  • get thumbnail from video URL but it takes more than 5 seconds to load data on recycler view
  • How to fix 'Android SDK not found at this location' error while installing flutter?
  • Android Shared Storage protection issue
  • How can I clone views using java code in Android Studio
  • Hide title and action bar for splash screen and remove White screen in start
  • Why can not hashing key android for facebook
  • Can not create handler inside thread that has not called Looper.prepare()
  • ID of the child views in a custom view are same in Android
  • Android: unable to hide appbar on scrolling
  • Best layout for form-style screen
  • How To create multiple function in Adapter Class Android with Retrofit
  • Can the Android Flow virtual layout handle variable-width Views
  • How to fix "Unable to load class 'dagger.Multibindings'" due to problems with gradle
  • VpnService always-on "not supported by this app"
  • Android Studio - Gradle "Sync now" is not Available
  • How do i get my code to give my current location?
  • Could not initialize class sun.util.calendar.ZoneInfoFile while using Flutter firebase-notifications
  • How to implement circular to check / tick animation in Android?
  • Toolbar shadow not showing
  • Android Sqlite get rows where first character is not an Alphabet
  • why I receive "bad request" in my request by retrofit
  • Intercept NavigationUI.onNavDestinationSelected() to make backstack pop with "inclusive = true"
  • I have a problem with the navigation fragments in my proyect, it sais that I need a defaut nav host atribute but I alrea
  • How can I keep a BottomSheetDialogFragment height to always match_parent?
  • How to reference a timerPicker in android studio using kotlin
  • Firebase Crashlytics - get stacktrace info to display during CrashlyticsListener.crashlyticsDidDetectCrashDuringPrevious
  • Schedule a repeating alarm clock
  • Can't assign values outside onTouchListener
  • Is setContentView() needed to inflate a fragment?
  • Why instead of string method returns Kotlin.Unit?
  • Retrofit slash as Query
  • When does onCreateView() get called in this app?
  • Fragment is reloaded each time after rejecting location permission
  • How to read ViewModel data from sttrings.xml list of items
  • Flutter doctor does not see vs code ,VS code does not detect flutter/bin
  • How to build aar in flutter
  • Is displayMetrix xdpi and ydpi accurate?
  • How to detect doubletap on a View?
  • how to play an encrypted file in Android
  • Android: keytool error on the command line when locating debug.keystore
  • Android paint/canvas issue; drawing smooth curves
  • Problems with starting an activity in onStart
  • Performance of map overlay in conjunction with ItemizedOverlay is very poor
  • How to change android indeterminate ProgressBar color?
  • How do I change the Mobile Country Code (MCC) in the Android Emulator?
  • Stop Progressbar manual scrolling in Android
  • Android: download large file
  • Android : uploaded .apk file to server but cant download that .apk file
  • How do I distribute Android app to beta tester without using Market
  • Android Unable to launch the Inbox from a notification
  • Android: Ringer mode changed to silent doesn't stop the phone vibrating
  • Change the side the text appears on a radio button
  • Check the memory usage anp cpu and power of an application in android
  • What is the String 'volumeName' argument of MediaStore.Audio.Playlists.Members.getContentUri referring to?
  • shadow
    Privacy Policy - Terms - Contact Us © scrbit.com