Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def login(request):
- key = "some key"
- secret = "app secret key"
- return_url = "http://localhost:8000/token/"
- api = linkedin.LinkedIn(key, secret, return_url)
- if(api.request_token()):
- auth_url = api.get_authorize_url()
- request.session['api_obj'] = api
- return HttpResponseRedirect(auth_url)
- #below is the view that will get called with the oauth oken.
- def token(request, param):
- #This return api as "none". Anything wrong?
- api = request.session.get('api_obj')
- #do stuff with the api.
Advertisement
Add Comment
Please, Sign In to add comment