I am learning to build fb apps, and on the very first attempt, I get this strange OAuthException. The tutorial clearly mentions that I need to pass redirect_uri, client_secret, client_id and code(from the app auth phase). But when the flow completes, instead of getting an access token here is the JSON error object I get:
{"error":{"message":"client_secret should not be passed to \/oauth\/access_token\/","type":"OAuthException"}}
EDIT: this is the snippet I'm using to build the url(pardon the excessive 2nd line, please)
url = "https://graph.facebook.com/oauth/access_token/"
url += "?"
url += urllib.urlencode([('client_id',client_id),
('redirect_uri', redirect_uri),
('client_secret', client_secret),
('code', code)])
where the variables hold correct values.(checked > 5 times)
You should remove the / immediately after access_token in the url so that it reads graph.facebook.com/oauth/access_token?
followed by your parameters. If that doesn't do it, please show an entire sample url you have generated (with the real client_secret x'ed out of course) since I am not familiar enough with urllib.urlencode to be sure of the formatting, although that part looks right at a glance.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With