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

Unauthorized Error - Get The Number of Followers That A Blog Has #12

Closed
peoplecallmefrancois opened this issue Jul 10, 2013 · 12 comments
Closed

Comments

@peoplecallmefrancois
Copy link

This is the JSON response, when I use this library to get the followers of a blog.

{'meta': {'status': 401, 'msg': 'Not Authorized'}, 'response': []}

This is what I use to call it:
#client is declared elsewhere tumblr_followers = json.loads(json.dumps(client.followers('good')))

print tumblr_followers

I am able to use the library for getting Blog Posts, I was just wondering how I could get the total number of followers of a blog, since apparently I am not authorized to get this info? Thanks.

Francois


After reading some documentation, it turns out you need OAuth, I'm still relatively new to Python, how do I make an OAuth request to Tumblr? I have the OAuth Consumer Key/Secret/API Key/Secret.

Thanks for the help in advance.

@seejohnrun
Copy link
Contributor

When you instantiate your client, you can pass the OAuth details like so (from the README):

client = pytumblr.TumblrRestClient(
    '<consumer_key>',
    '<consumer_secret>',
    '<oauth_token>',
    '<oauth_secret>',
)

That should get you all set - let me know if you end up with more questions!

@peoplecallmefrancois
Copy link
Author

I am doing that. Maybe my oauth token and oath are wrong?

@seejohnrun
Copy link
Contributor

Could be - how are you getting the token & secret?
An easy way is to check out the API console at: https://api.tumblr.com/console and use the keys from there

@peoplecallmefrancois
Copy link
Author

Thanks! I never knew you could do that (it's quite useful), I was just following some instructions I found somewhere online.

So now, I can get the number of followers for my blog.

Does Tumblr allow me to get the number of followers of a blog other than mine? Because I still get errors when I try to get the number of followers, for example, that notoriousgifs.tumblr.com has.

@codingjester
Copy link
Contributor

You cannot get the followers or number of a blog you do not own or belong to, @peoplecallmefrancois.

@peoplecallmefrancois
Copy link
Author

Oh ok, thanks for the confirmation, I just had thought that maybe it was like Twitter in the followers sense (number of followers is public). Thanks for your help, and in the process I also got to know about the API console! 👍

@peoplecallmefrancois
Copy link
Author

Oh, a possible enhancement, maybe add a link to the API console to the readme, so it is easy for noobs like me to get it configured properly. @codingjester @seejohnrun

@codingjester
Copy link
Contributor

Sure. We're probably also going to create an interactive console so that
will walk you through the 3-legged oauth process.

On Tue, Jul 16, 2013 at 11:22 AM, peoplecallmefrancois <
notifications@github.com> wrote:

Oh, a possible enhancement, maybe add a link to the API console to the
readme, so it is easy for noobs like me to get it configured properly.
@codingjester https://github.com/codingjester @seejohnrunhttps://github.com/seejohnrun


Reply to this email directly or view it on GitHubhttps://github.com//issues/12#issuecomment-21049483
.

John Bunting

Simplicity is prerequisite for reliability
--Edsger W. Dijkstra

@seejohnrun
Copy link
Contributor

API console links to individual projects on github links coming soon

@avtavgen
Copy link

have the same proble, after passing OAuth deteils still have this output:
{
"meta": {
"status": 401,
"msg": "Not Authorized"
},
"response": []
}

@codingjester
Copy link
Contributor

Are you trying to access a blog that you have access to? You can't see the followers or number of followers for say, my blog with your app keys without me authorizing your app.

@peoplecallmefrancois
Copy link
Author

Oh ok, thanks, @codingjester , I just assumed that Tumblr's followers system worked similar to Twitter's.

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

No branches or pull requests

4 participants