Ask Your Question

Login with broken (with fix)

asked 2012-10-16 18:49:17 -0500

gniibe's avatar

updated 2012-10-19 07:18:23 -0500

todofixthis's avatar

Login with doesn't work now. I realized that this site doesn't have the feature, either.

In the code:

 def get_identica_user_id(data):
     consumer = oauth.Consumer(data['consumer_key'], data['consumer_secret'])
     token = oauth.Token(data['oauth_token'], data['oauth_token_secret'])
     client = oauth.Client(consumer, token=token)
     url = ''
     content = urllib2.urlopen(url).read()
     json = simplejson.loads(content)
     return json['id']

Line 417, the assignment to content, is wrong. We need to authenticate here.

It should be:

   response, content = client.request(url, 'GET')

With this change, login with (askbot 0.7.43) works for me.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-10-18 17:41:52 -0500

Evgeny's avatar

Thanks, I've applied your change (in the git repo), but did not test it. Could you try?

It might be easier to make a fix on github and make a pull request.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-10-16 18:49:17 -0500

Seen: 198 times

Last updated: Oct 19 '12