2012-03-19 93 views
0

你好我試着從一個應用程序創建的私人活動PHP API創建私有事件

我可以創建邀請,邀請好友等罰款,但我不能讓該事件爲私有要創建(只邀請)

我用它來創建事件的PARAMS是

$event_param = array(
    "name" => "Event Name", 
"start_time" => $nextWeek, 
"location" => $where, 
"privacy" => 'CLOSED', 
"description" => $description 
); 

在隱私選項都試過「私人」,「關閉」和「祕密」,但所有創建一個公共事件。

我已授予以下權限

user_about_me, 
user_birthday, 
read_friendlists, 
publish_stream, 
read_stream, 
email, 
create_event, 
rsvp_event, 
user_events, 
friends_events 

任何幫助表示讚賞

感謝

回答

0

field名爲privacy_type隱私設置(不privacy)。

+0

感謝完美工作,仍然無法找到的文檔 – GafferG 2012-03-19 16:37:50

+0

@GafferG中,瞧:用戶事件(http://developers.facebook.com/docs/reference/api/user/ #事件),[頁面事件](http://developers.facebook.com/docs/reference/api/user/#events);) – 2012-03-19 16:45:59

0

儘管Facebook文檔說「隱私」,它應該是「privacy_type」。

示例;

$statusUpdate = $facebook->api("/$user/events", 'post', array(
      'name' => $your_event_title, 
      'description' => $your_event_description, 
      'start_time' => $start_date_event, 
      'privacy_type' => $privacy_type, 
      'owner' => $your_facebook_user_id, 
      'location'=> $location_of_event)); 
    } catch (FacebookApiException $e) { 
     d($e); 
    } 

查找更多關於在Facebook文檔中創建事件的信息。

DOCS:https://developers.facebook.com/docs/reference/api/event/