我想通过PHP将事件发布到“事件日历”中,请参阅屏幕... http://imageshack.us/photo/my-images/4/fbevents.png/
它的工作原理与下面的脚本一样,我可以通过...
直接调用事件facebook.com/event.php?eid= {ID}
...但事件是“事件日历”中的不是侦听 ...这就是我想要的!
- >我是怎么做到的?
来自德国的问候, codeboot
PS。对不起我的英文。
require_once ('fb-php-sdk/facebook.php');
$app_id = 'xxx';
$secret = 'xxx';
$id_profile = 'xxx';
$facebook = new Facebook(array(
'appId' => $app_id,
'secret' => $secret,
'cookie' => true,
));
$event_info = array(
'name' => 'abc event',
'description' => 'lorem ipsum dolor sit',
'owner' => 'eric example',
'location' => 'Location name and street',
'city' => 'berlin',
'start_time' => date('Y-m-d H:i', time()),
'privacy_type' => 'OPEN'
);
$event_id = $facebook->api('/'.$id_profile.'/events', 'post', $event_info);