これは、facebook-sdk の例から取得した access_token の取得の一部です。を取得した後code
、以下の例に正確に従っています
if self.request.get("code"):
args["client_secret"] = FACEBOOK_APP_SECRET
args["code"] = self.request.get("code")
response = cgi.parse_qs(urllib.urlopen(
"https://graph.facebook.com/oauth/access_token?" +
urllib.urlencode(args)).read())
access_token = response["access_token"][-1]
私が得るエラーresponse
は
'{"error":{"message":"Error validating verification code. Please make sure your redirect_uri is identical to the one you used in the OAuth dialog request","type":"OAuthException","code":100}}
誰が何が悪いのか教えてもらえますか?
これは、access_token を取得するために取得するリンクです
https://graph.facebook.com/oauth/access_token?code=AQD3K0Qc-9mJ1pUIWovhbO549GIk-X_y2v6VRbjFB_WtHMtINtU6GTZ4T2rBbjUr9teiGbhxsBm23xjRXhX4CfWdMXgsNXjgTOUeG9Nz6oNmgluvZwv3oQQ42w8vBTowlDGOdKvmW065WrQTLW3e8oZJ7C_XNwUl5bYDD5JF_JLD9O4BBfAGbfRHWHAf6Yy0ewaJr8MmtU-qhemYe8mQ2hrM&client_secret=xxxxx&redirect_uri=http%3A%2F%2F127.0.0.1%3A8088&client_id=xxxx
それはhttps://graph.facebook.com/oauth/access_token?
code
、、、client_secret
_redirect_uri
client_id
access_token を取得するためのパラメーターを見逃していませんか?