Facebook FQL query using graph api

Share on TwitterDigg This

we can run facebook FQL query using the graph api.
Here example to get facebook photos from facebook album
First we need to include the facebook class then create an object of facebook class
by using a simple example of FQL query we get an array of details of photos of particular album

require '../src/facebook.php';
 
 $facebook = new Facebook(array(
  'appId'  => '...',
  'secret' => '...'));
function get_photos_by_album_id($album_id){
 
if($album_id)
        $fql            =   'SELECT pid,src_big,owner,link,position,created,caption,src FROM photo WHERE aid="'.$album_id.'"';
 
                $param  =   array(
                'method'    => 'fql.query',
                'query'     => $fql,
                'callback'  => ''
            );
            $fqlResult   =   $facebook->api($param);
    return $fqlResult;
 
}

Related

About prabin t p

Connect with me on Google+
This entry was posted in facebook, php and tagged , . Bookmark the permalink.

5 Responses to Facebook FQL query using graph api

  1. Alpatih says:

    ! They really had a lot of fans and rednaig on other sites I have heard people mention there should be a Jeff and Jordan show? I don’t know how that would turn out but it sounds interesting!I can’t wait for tonights episode on Amazing Race “Trouble in Paradise.” It should only get better from here on out! And it does appear that the challenges are getting harder which is good. Great Job Jill!

  2. Sammy says:

    Wham bam thank you, ma’am, my questinos are answered!

  3. I just want to mention I am just very new to blogging and site-building and absolutely loved your web blog. More than likely I’m planning to bookmark your blog post . You amazingly come with beneficial writings. Many thanks for sharing with us your webpage.

  4. quotes says:

    It is actually a great and helpful piece of information. I’m happy that you just shared this useful information with us. Please keep us up to date like this. Thank you for sharing.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

*