所以我已经在我的Django项目上设置了Django allauth,并连接到了Instagram,当我这样做的时候,我现在已经在我的管理网站上有了社交账户类别和我的账户注册,到目前为止一切都很好
在下面的页面上,我可以看到一个名为extra data的字段,我如何将它放入普通用户数据库中,这样我就可以使用它来获取我从额外数据中获得了多少粉丝?我可以用我拥有的令牌来请求关注者吗?

发布于 2018-08-12 10:08:10
您可以像访问其他任何django模型一样简单地访问SocialAccount模型:
from allauth.socialaccount.models import SocialAccount
def instagram(request):
data = SocialAccount.objects.get(user=request.user).extra_data
follows = data.get('counts')
return render(request, 'Path.to.html', {"follows": follows})https://stackoverflow.com/questions/51804368
复制相似问题