Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get user name and email address? #2

Closed
AndroidTechvalens opened this issue May 27, 2016 · 10 comments
Closed

How to get user name and email address? #2

AndroidTechvalens opened this issue May 27, 2016 · 10 comments
Assignees

Comments

@AndroidTechvalens
Copy link

Hello Developer,

Great work you have done!!
Can u please let me know how to fetch the user name and email address?

@ArcherN9
Copy link
Owner

Hey @AndroidTechvalens.
Refer Jumblr Official Documentation.

Post retrieving OAuthToken and OAuthSecretToken from Loglr, all you have to do to retrieve User details

// Create a new Jumblr client
JumblrClient client = new JumblrClient("CONSUMER KEY", "CONSUMER SECRET KEY");
client.setToken(
       strOAuthToken,     //Received from loginResult.getOAuthToken() method
       strOAuthTokenSecret //Received from loginResult.getOAuthTokenSecret() method
);

Once that's done, your JumblrClient may send and receive information from Tumblr.. To gain access to User's details, simply...

User user = client.user();
Log.i(TAG, user.getName()); 

Explore methods available in the User class. It'll return whatever information you require.

@ArcherN9 ArcherN9 self-assigned this May 27, 2016
@AndroidTechvalens
Copy link
Author

Hey,
Thanks for your response but this is JAVA library https://github.com/tumblr/jumblr and I need to add this in Android app.

Still not able to achieve this.

@AndroidTechvalens
Copy link
Author

Any JAR file to import JumblrClient class

@ArcherN9
Copy link
Owner

Just use

compile 'com.tumblr:jumblr:0.0.11'

@AndroidTechvalens
Copy link
Author

Thanks Man,

It really help me but i am getting below error -

   org.scribe.exceptions.OAuthConnectionException: There was a problem while creating a connection to the remote service.
                                                                 at org.scribe.model.Request.send(Request.java:69)
                                                                 at org.scribe.model.Request.send(Request.java:75)
                                                                 at com.tumblr.jumblr.request.RequestBuilder.get(RequestBuilder.java:92)
                                                                 at com.tumblr.jumblr.JumblrClient.user(JumblrClient.java:83)

@AndroidTechvalens
Copy link
Author

AndroidTechvalens commented May 27, 2016

Great work from your side.
All issues are resolved, many thanks for your help

@ArcherN9
Copy link
Owner

Glad bro.

@AndroidTechvalens
Copy link
Author

Is it possible to get the email address?

@ArcherN9
Copy link
Owner

That depends on whether Jumblr Gives it away or not. I'm unsure.. you'll have to explore the User class in Jumblr.

@AndroidTechvalens
Copy link
Author

Actually its not giving Email address, anyways thanks once again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants