pip install rauth python import rauth app_id = "YOUR_APP_ID" app_secret = "YOUR_APP_SECRET" python session = rauth.OAuth2Session( client_id=app_id, client_secret=app_secret, redirect_uri="http://localhost:8000/callback" ) authorize_url = session.get_authorize_url( ) print(authorize_url) token = session.get_access_token( data={ "code": authorization_code, "redirect_uri": "http://localhost:8000/callback" } ) python api_url = "https://graph.facebook.com/v15.0/me" response = session.get(api_url) user_data = response.json() if response.status_code == 200: else:


上一篇:
下一篇:
切换中文