Take the 2-minute tour ×

I am trying to create an event on Facebook on behalf of the page i own with Graph API. From FB documentation i read that it is done like this:

POSTing name and start_time (other things are optional) to https://graph.facebook.com/{Page_ID}/events

with proper premissions (create_event, manage_pages)

playing around with this in Graph API Explorer i do get event created but it is done under my own profile rather than Page.

So is it possible to create the event under the Page i own rather than my profile?

PS i double checked the page id so it is not my profile id

PPS I know there are allready many discussions about this here, but unfortunatley i couldnt find a straightforward answer to my question.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

So i figured this out myself. I needed to post it with page access token. heres the code

$page_info = $this->fb->api('/' . $page_id . '?fields=access_token');

$path = realpath(APPPATH . '../path/to/img');
$args = array(
    'start_time' => $start_time,
    'description' => $description
    'name' => $name,
    'location' => $loaction
$img = 'img.jpg';
if ($upload) {// if picture is needed
    $args['@' . $img] = '@' . $path . '/' . $img;


$res = $this->fb->api("/" . $this->input->post('fb_event'), "post", $args); // should give back event id        
share|improve this answer
This doesn't actually help anyone who needs it, because the code you post doesn't give enough insight. –  Scott Fleming Feb 11 at 22:13

Your Answer


