def response1(request):
    code = request.GET['code']
    API_KEY = "75b6nt9kewzh8f"
    API_SECRET = "xdhRsXeOAAi9tXB3"
    RETURN_URL = "http://127.0.0.1:8000/linkedin/response1"
    authentication = LinkedInAuthentication(API_KEY,API_SECRET,RETURN_URL,PERMISSIONS.enums.values())
    authentication.authorization_code = code
    authentication.get_access_token()
    application = LinkedInApplication(authentication)

    profile = application.get_profile(selectors=['id', 'first-name', 'last-name','headline', 'location', 'distance', 'num-connections', 'skills', 'educations'])

    connections = application.get_connections()

    return render_to_response('linkedin/profile.html',{'profile':profile, 'connections':connections})