Facebook getAccessToken() returns app access token: works fine in one server but throws app access token in other.

你。 提交于 2019-12-25 07:30:20

问题


Facebook getAccessToken() returns app access token: works fine in one server but throws app access token in other. I have tried all the answers given in previous such questions. But doesn't seem to work.

<code>
$acces_token = $this->facebook->getAccessToken();
print_r($acces_token);

output:
app ID | app secret 
</code>

The funny part here is the same code works in localhost and one of my servers. I recently got another server, and this thing doesn't work in this server.


回答1:


I had the same problem today, turns out I didn't have the "fb_ca_chain_bundle.crt" file included (and I had the same problem before, the .crt was out of date) (https://github.com/facebook/facebook-php-sdk/tree/master/src). So this may be the issue, and it wasn't documented in their instructions, so both times took me a while to figure out.



来源:https://stackoverflow.com/questions/17604337/facebook-getaccesstoken-returns-app-access-token-works-fine-in-one-server-but

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!