def home(request):
return HttpResponse('''
Login with <a href="login/">Facebook</a>.<br />
''')
def facebook_login(request,provider_name):
params = {
'scope': [settings.FACEBOOK_APP_SCOPE],
'client_id': settings.FACEBOOK_APP_ID,
'redirect_uri': settings.SITE_URL + '/auth/facebook/callback'
}
url = "https://graph.facebook.com/oauth/authorize?" + urllib.urlencode(params)
print url
return HttpResponseRedirect(url)
这是我得到的错误:
error=invalid_scope&error_description=Unsupported+scope%3A+%27%5B%27public_profile%27%5D%27.+Supported+scopes%3A+ads_management+ads_read+email+manage_notifications+manage_pages+offline_access+publish_actions+read_friendlists+read_insights+read_mailbox+read_page_mailboxes+read_stream+rsvp_event+user_about_me+user_activities+user_birthday+user_education_history+user_events+user_friends+user_games_activity+user_groups+user_hometown+user_interests+user_likes+user_location+user_photos+user_relationship_details+user_relationships+user_religion_politics+user_status+user_videos+user_website+user_work_history