在网站上显示即将到来的 Facebook 活动,适用于一个页面而不是另一个页面

Displaying upcoming Facebook events on site, works for one page and not the other

我找到了一个生成器,它允许您嵌入一些 HTML,它显示来自 Facebook 页面的即将到来的 Facebook 事件。

这是我使用的代码,基于我创建的临时 Facebook 页面,此代码工作正常:

<iframe src="http://www.bandrx.com/facebook/events.php?theme=zuck&page=samtestmaze/events&bgcolor=ffffff&textcolor=000000&linkcolor=555555&max=5" width="320" height="520" frameborder="no" scrolling="auto"></iframe>

但是当我使用这个 Facebook 页面 (Facebook.com/themazerio/events) 时,它似乎没有显示即将发生的事件。这是代码(不工作):

<iframe src="http://www.bandrx.com/facebook/events.php?theme=zuck&page=themazerio/events&bgcolor=ffffff&textcolor=000000&linkcolor=555555&max=5" width="320" height="520" frameborder="no" scrolling="auto"></iframe>

我知道它选择了正确的页面,因为它在点赞计数器中显示有多少人喜欢该页面,但它没有显示即将发生的事件。

有人知道是什么原因造成的吗?

谢谢

正如 in the comments, the problem is not code-related, it is simply not working because the facebook page "TheMazeRio 所指出的,未登录 Facebook 的用户不可见。

以下是阻止 "guests" 查看 Facebook 页面的主要因素:

1 – 国家/地区限制:

In case you have applied this, Your page will not be visible to fans of other countries. Country restricted pages can only be visited by logging in. So make sure there should be no country restrictions.

2 – 年龄限制:

Age restriction is also a constraint that makes your Facebook page visible for selective users/fans or for a particular age group. Make sure there is no age restriction on your page otherwise it will not be visible to certain users without logging in to Facebook.

3 – 脏话黑名单:

If you have selected an option other than “none” your page will not be public. Users must be logged in to view your page.

4 – 审核黑名单:

If there is anything written in that box, your page will not be public. Someone must be logged in, in order to view your page. Restrictions are a good tool to make your Facebook page more compliant with your business or product.

来源:How to make your Facebook page publicly visible

P.S。您始终可以通过在 private/incognito 浏览器 window 中打开页面 link 或退出您的 Facebook 来轻松测试 Facebook 页面的 public 可见性。