php:画布页面中的图形 api 导致服务器错误

发布于 2024-12-18 20:30:50 字数 383 浏览 4 评论 0原文

我遇到以下问题,请帮我解决。

我试图通过图形 api 仅使用 page_id 请求页面详细信息。 据我所知,我不需要此调用的访问令牌。以下是我的代码。

$graphApi = $facebook->api('/' . $data['fb_page_id'], 'GET');

上面的内容在本地运行良好,但是当我上传到 Facebook 并查看画布页面时,它给了我空白页面。

调试后我收到此错误

服务器错误 该网站在检索(我的画布网址)时遇到错误。它可能因维护而停机或配置不正确。

一旦我删除了图形 API,一切都会恢复正常。

提前致谢!

Im having following issue please help me out.

Im trying to request page details via graph api with page_id only.
And as far as I know I don't need a access token for this call. following is my code.

$graphApi = $facebook->api('/' . $data['fb_page_id'], 'GET');

Which above works fine locally, however when i upload to facebook and check out canvas page it give me blank page.

after debug i get this error

Server error
The website encountered an error while retrieving (my canvas url). It may be down for maintenance or configured incorrectly.

and once i remove the graph api everything return back to normal.

Thanks in advance!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

幼儿园老大 2024-12-25 20:30:50

好吧,仍然不知道为什么 graph api 会导致服务器错误,但现在有了另一个解决方案。我想获取页面详细信息的原因是我只想要应用程序页面的链接,因此我没有使用 api 调用,而是使用以下 url 来获取链接。

“http://www.facebook.com/pages/view/yourpageid”将重定向到页面链接。

希望这能帮助一些人!

Alright still dont know why is graph api causes server error, but got another solusion now. Reason i want to get the page details is that i just want the link to app page so instead of using api call i used the following url to get the link.

"http://www.facebook.com/pages/view/yourpageid" that will redirect to the page link.

hope this will help some people out!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文