Facebook API我得到“方法未实现”错误,但如果我把url放在浏览器中,它会工作


Facebook API I get "Method Not Implemented" error, but it works if i put the url in a browser

当我调用https://graph.facebook.com/oauth/access_token时,我一直得到一个返回字符串,上面写着"方法未补充"我在php中调用它,如下所示file_get_contents (" https://graph.facebook.com/oauth/access_token?my_ap_id& redirect_uri = http://www.besttechsolutions.biz/projects/facebook/index.phpclient_secret=MySecret458d628b1af&代码= "。美元代码);我得到未实现方法请求中的方法无效。如果我把url放到浏览器中,它会返回代码。为什么它可以在浏览器中工作,但当我使用file_get_contents函数????时却不行

我认为你的PHP函数正在做POST而不是GET。这就是Method Not Implemented的意思,你做错了。

当你把它放到浏览器中时,它会做一个GET。