Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9235917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:09:57+00:00 2026-06-18T07:09:57+00:00

I am trying to create an event via a facebook page. I have given

  • 0

I am trying to create an event via a facebook page. I have given the page id and create_event permission. Yet my event is not getting posted. I keep getting this

        [message] => (#100) Invalid parameter
                [type] => OAuthException
                [code] => 100

I am using the following coding which was posted in these forums

    $page_id='xxxxx';
    $event_info = array( 
    'name' => 'abc event', 
    'description' => 'hi dis s an event', 
    'owner' => 'eric example', 
    'location' => 'Location name and street', 
    'city' => 'chennai', 
    'start_time' => date('Y-m-d H:i', time()), 
    'privacy_type' => 'OPEN' ); 

     $event_id = $facebook->api('/'.$page_id.'/events', 'post', $event_info);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T07:09:59+00:00Added an answer on June 18, 2026 at 7:09 am

    I figured it out… I made a mistake in specifying the time

    $page_id = $_SESSION['xxxxx'];
    $pid='xxxxxxx';
    
    // Now, getting the PAGE Access token, using the user access token
    
     $page_token_url = "https://graph.facebook.com/$page_id?fields=access_token&" .       $access_token;
     $response = file_get_contents($page_token_url);
    
    // Parse the return value and get the Page access token
    $resp_obj = json_decode($response,true);
    
    $page_access_token = $resp_obj['access_token'];
    
    $event_param = array(
        'name' => 'abc event', 
        'description' => 'hi dis s an event', 
        'owner' => ' example', 
        'location' => 'Location name and street', 
        'city' => 'chennai', 
        'start_time' => '2013-12-31T13:45:00+0100', 
        'privacy_type' => 'OPEN' ,
    'page_id'       => $pid
    );
    
    try
    {
        $fb_event_id = $facebook->api('/'.$pid.'/events?access_token=ACCESS_TOKEN', "POST", $event_param);
    }
    catch (FacebookApiException $e)
    {
        echo $e->getMessage();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create an event via the Facebook API; however, I keep getting
I'm trying to create an event through the Facebook Graph API and I keep
I have a database with event names and dates. I am trying to create
I am trying to create a click event via jQuery Here is the HTML
I am trying to create new Event objects to be persisted in the database
I've been trying to create a generic event. Basically it should look like this:
Im trying to create an ajax (post) event that will populate a table in
I'm trying to catch a double-click event in a TreeView's empty area to create
I'm trying to create an event through the API and it is mostly working,
I'm trying to create a Samsung Smart TV application. I have the SDK installed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.