Facebook getAccessToken()返回应用程序访问令牌:在一个服务器中工作正常,但在其他服务器中抛出应用程序访问令牌。 [英] Facebook getAccessToken() returns app access token: works fine in one server but throws app access token in other.
问题描述
Facebook getAccessToken()返回应用程序访问令牌:在一个服务器中工作正常,但在其他服务器中抛出应用程序访问令牌。
我已经尝试了以前提出的所有答案。但似乎不起作用。
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>
这里有趣的部分是相同的代码在localhost和我的一个服务器上工作。我最近有另一台服务器,这个东西在这个服务器上不起作用。
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.
推荐答案
今天我有同样的问题我没有包含fb_ca_chain_bundle.crt文件(和我以前有同样的问题,.crt已过期)( https://github.com/facebook/facebook-php-sdk/tree/master/src )。所以这可能是问题,并没有记录在他们的指示,所以两次都花了我一段时间才能弄清楚。
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.
这篇关于Facebook getAccessToken()返回应用程序访问令牌:在一个服务器中工作正常,但在其他服务器中抛出应用程序访问令牌。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!