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 6821031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:29:47+00:00 2026-05-26T21:29:47+00:00

Is there a way with the Facebook Graph API to get a list of

  • 0

Is there a way with the Facebook Graph API to get a list of all events created by a single profile? Our client creates a bunch of events and we want to pull a list of them all. I said that they would just have to make sure they set themselves to be attending the event, because then I can easily pull the list of events that profileId is attending, but I’m curious if there’s another way. Maybe an FQL query? They look to require a query on the primary key though. And what would that FQL query look like if that’s the way to do it??

  • 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-05-26T21:29:48+00:00Added an answer on May 26, 2026 at 9:29 pm

    I basically used the FQL that @jhchen provided. However, it took me about 6 hours to figure out how to use that FQL. So I figured, I would provide you a working script. It’s not perfect so please update it if you find a bug.

    1. Download Facebooks PHP SDK
    2. Add YOUR_APP_ID
    3. Add YOUR_APP_SECRET
    4. Add PAGE_ID
    5. Make changes to the FQL statement as you see fit. FQL Documentation

    Other than that you should be good to go. Also, I set the default timezone to America/Los_Angeles. This will probably cause problems for some of you, if anyone has a better way to handle the timezones please let me know.

    PHP Code:

    <?php
    require_once("php/facebook.php");
    
    date_default_timezone_set('America/Los_Angeles');
    
    function display_events()
    {
        $app_id = 'YOUR_APP_ID';
        $secret = 'YOUR_APP_SECRET';
        $page_id = 'PAGE_ID';
    
        $config = array();
        $config['appId'] = $app_id;
        $config['secret'] = $secret;
        $config['fileUpload'] = false; // optional
    
        $facebook = new Facebook($config);
    
        $fql = 'SELECT 
                    eid, 
                    name, 
                    pic_square, 
                    creator,
                    start_time,
                    end_time
                FROM event 
                WHERE eid IN 
                    (SELECT eid 
                        FROM event_member 
                        WHERE uid='.$page_id.'
                    ) 
                AND end_time >= ' . mktime() . '
                ORDER BY start_time ASC
        ';
    
        $ret_obj = $facebook->api(array(
            'method' => 'fql.query',
            'query' => $fql,
        ));
    
        $html = '';                            
        foreach($ret_obj as $key)
        {
            $facebook_url = 'https://www.facebook.com/event.php?eid=' . $key['eid'];
    
            $start_time = date('M j, Y \a\t g:i A', $key['start_time']);
            $end_time = date('M j, Y \a\t g:i A', $key['end_time']);
    
            $html .= '
                <div class="event">
                    <a href="'.$facebook_url.'">
                        <img src="'.$key['pic_square'].'" />
                    </a>
                    <span>
                        <a href="'.$facebook_url.'">
                            <h2>'.$key['name'].'</h2>
                        </a>
                        <p class="time">'.$start_time.'</p>
                        <p class="time">'.$end_time.'</p>
                    </span>
                </div>
            ';
        }
    
        echo $html;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there anyway to get a list of mutual friends using Facebook's Graph API?
Is there a way to crawl all facebook fan pages and collect some information?
Using the Facebook API, is there a way of getting a friend's phone/cell number?
I'm using the Facebook Graph Api to load all friends of the current user
I know there's a Graph api url for getting the recent wall feeds: https://graph.facebook.com/me/feed?access_token=...
I want to access the Facebook Graph API and get JSON responses like this:
I'm trying to use the Facebook Graph API to get the latest status from
According to Facebook graph API we can request a user profile picture with this
I've been looking around for a way to convert Facebook Graph API Data into
My Facebook group is about my iPhone software. Is there a way to have

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.