Facebook getAccessToken() returns app access token

2019-08-23 05:40发布

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条回答
仙女界的扛把子
2楼-- · 2019-08-23 06:36

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.

查看更多
登录 后发表回答