通过浏览器获取Facebook access_key

时间:2011-10-17 01:50:45

标签: facebook facebook-graph-api

我正在尝试使用单个access_key代表我登录的Facebook帐户执行api调用。我一直在努力做到以下几点:

打开此网址:

https://www.facebook.com/dialog/oauth?
    client_id=231630290230623&
    redirect_uri=http://owencoutts.com

浏览器被重定向到:

http://owencoutts.com/?code=AQDbSnDH4pROQcehhOZDhpNpQaA3mPBNigkaVQSOgsCFPCmTFO_rUnr1mlOdb-MB6CryDYvJE6Pvbz2BS3-9lp9una8rJ1rVH0ZKPdS-F1wUtVv9QBpkJoTOrrZsyxRK14eiDW5fK28AqgJs5fdDh4mu7fYst8cp5V4SIcTMgNmc9WUQDIPI84oHlBp9y-k18kA#_=_

所以我将代码粘贴到我的oauth请求中(从最后减去# = ):

https://graph.facebook.com/oauth/access_token?
    client_id=231630290230623&
    redirect_uri=http://owencoutts.com&
    client_secret=<#Client Secret goes here>&
    code=AQDbSnDH4pROQcehhOZDhpNpQaA3mPBNigkaVQSOgsCFPCmTFO_rUnr1mlOdb-MB6CryDYvJE6Pvbz2BS3-9lp9una8rJ1rVH0ZKPdS-F1wUtVv9QBpkJoTOrrZsyxRK14eiDW5fK28AqgJs5fdDh4mu7fYst8cp5V4SIcTMgNmc9WUQDIPI84oHlBp9y-k18kA

我收到以下错误:

{
    "error": {
        "message": "Error validating verification code.",
        "type": "OAuthException"
    }
}

我该如何解决这个问题?

0 个答案:

没有答案