Answer the question
In order to leave comments, you need to log in
Get access_token vkontakte (python-social-auth)?
Using python-social-auth, user login on the site. For further work with api, it is necessary to receive an access_token, how to do this?
At the moment, the view code is:
import vk
from django.http import HttpResponse
from django.shortcuts import render
def home(request):
session = vk.Session()
api = vk.API(session)
posts = api.newsfeed.get()
return render(request, 'home.html', {'posts':posts})
Answer the question
In order to leave comments, you need to log in
The token is stored in this model:
AbstractUserSocialAuth.extra_data
Hold on, I hope you are able to bring it to the form that you require)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question