Facebook的PHP API,邮报在页面上事件 [英] Facebook PHP API, Post an Event on a Page

查看:113
本文介绍了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.

这篇关于Facebook的PHP API,邮报在页面上事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆