Facebook的PHP API,邮报在页面上事件

问题描述:

我现在正在寻找了几天,我还没有找到一种方法来发布事件到页面我联系,所以我决定要问你。你可以做,以任何方式?

I'm searching for a few days now and I still haven't found a way to post events into a page I'm admin on, so I've decided to ask you. Can you do that in any way?

http://pastebin.com/WSHCDLdr

我试过用我/事件页面,它完美的作品(即使传播延迟是巨大的),但这是用户帐户。我想事件发布到我上同一帐户创建页面,或进入一个网页,我联系上。

I've tried with "me/events" page and it works perfectly (even though the propagation delay is huge), but this is the user account. I want to post the events into a page I created on the same account, or into a page I'm admin on.

这是我的code。如果你知道这件事情是可能的,在乎告诉我,我做错了什么,或者如果该方法是不同的,怎么做,我将非常感激。

This is my code. If you know this thing is possible, and care to tell me what I'm doing wrong, or if the method is different, how to do it I would be very grateful.

克里斯

我的认为的你需要的页面的access_token 在这里你如何得到它

I think you need the page access_token and here how you get it:

$page_id = "XXXXXXXXX";
$page_access_token = "";
$result = $facebook->api("/me/accounts");
foreach($result["data"] as $page) {
    if($page["id"] == $page_id) {
        $page_access_token = $page["access_token"];
        break;
    }
}

请确保您授予 manage_pages 许可并添加的access_token $ event_info 阵列。

Make sure you grant the manage_pages permission and add the access_token to the $event_info array.