简体   繁体   English

更改Canvas URL时Facebook PHP SDK墙帖出现问题

[英]Problem with Facebook PHP SDK wall post when changing the Canvas URL

I made an iFrame FB application for a company, which is perfectly working when stored in my server but when I moved it to the company server, and change the Canvas URL, the application worked fine apart from the $facebook->api('/me/feed/', 'post', $attachment); 我为一家公司制作了一个iFrame FB应用程序,当将其存储在服务器中时,它可以正常运行,但是当我将其移至公司服务器并更改Canvas URL时,该应用程序除$ facebook-> api('/ me / feed /','post',$ attachment); function which doesn't work anymore. 该功能不再起作用。

I wrote a simple test script doing the next actions: 1) creating a session 2) sending a post to the wall 我编写了一个简单的测试脚本,用于执行以下操作:1)创建会话2)向墙上发送帖子

In both cases (my server and the company server), the session is always correctly created but the post to the wall is not working for the company. 在这两种情况下(我的服务器和公司服务器),始终正确地创建了会话,但挂到墙上的帖子对公司不起作用。

I, of course, already tried to clear the cache, uninstall the application after changing the Canvas URL, but no luck. 我当然已经尝试清除缓存,在更改Canvas URL之后卸载应用程序,但是没有运气。 Still the session is created but the post to the wall never works. 会话仍然被创建,但张贴到墙上的帖子永远无法正常工作。

I also tried to move the application from my server to another folder in my server (different Canvas URL but same domain) and it worked fine. 我还尝试将应用程序从服务器移至服务器中的另一个文件夹(不同的Canvas URL,但相同的域),并且运行良好。 So maybe this means that the problem lies into the domain change in the Canvas URL ??? 因此,也许这意味着问题出在Canvas URL中的域更改中?

Note : Both my server and the company server use PHP 5. 注意:我的服务器和公司服务器都使用PHP 5。

Thanks in advance for your help! 在此先感谢您的帮助!

Solution : the fb_ca_chain_bundle.crt file was missing. 解决方案:fb_ca_chain_bundle.crt文件丢失。 The strange thing is that it was also missing on my server and it was working without it. 奇怪的是,它在我的服务器上也丢失了,没有它就可以工作。

Anyway, problem solved! 无论如何,问题解决了!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM