ykdojo / editdojo

(I'm no longer working on this - currently working on https://github.com/ykdojo/defaang)

Home Page:https://www.csdojo.io/edit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When following a user on Twitter, use their ID instead of their handle

ykdojo opened this issue · comments

commented

We need to do this just in case the user changes their user handle on Twitter.

commented

I'm going to work on this now.

commented

NOTES: in my Django console, I did the following.

from users.models import CustomUser
from allauth.socialaccount.models import SocialAccount

u = CustomUser.objects.filter(username = 'ykdojo')[0]
sa = SocialAccount.objects.filter(user = u)[0]
sa.uid # this gives me my Twitter ID, I think. I should be able to use this ID to follow this account instead of using the Twitter handle, which the user might change anytime.

commented

done: 2f58d0d