Services_Facebook
[ class tree: Services_Facebook ] [ index: Services_Facebook ] [ all elements ]

Class: Services_Facebook_FQL

Source Location: /Services_Facebook-0.1.2/Services/Facebook/FQL.php

Class Overview

Services_Facebook_Common
   |
   --Services_Facebook_FQL

Facebook FQL (Facebook Query Language) Interface


Author(s):

Version:

  • Release: 0.1.2

Methods


Inherited Variables

Inherited Methods


Class Details

[line 37]
Facebook FQL (Facebook Query Language) Interface

Facebook allows you to generically query data from their API in an SQL-like interface that they call FQL. This class allows you to send a raw query to the API and get a raw XML response back in the form of a SimpleXmlElement.



[ Top ]


Method Detail

query   [line 63]

object Instance query( string $query)

Send a FQL query

Senda a query to the Facebook API and returns the response in the form for a SimpleXmlElement.

  1.  <?php
  2.  require_once 'Services/Facebook.php';
  3.  $api Services_Facebook::factory('FQL');
  4.  $fql 'SELECT *
  5.          FROM user
  6.          WHERE uid IN (123, 345, 567)';
  7.  $result $api->query($fql);
  8.  foreach ($result->user as $user{
  9.      echo (string)$user->first_name;
  10.  }
  11.  ?>

  • Return: of SimpleXMLElement
  • Access: public

Parameters:

string   $query   —  FQL query string

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:24:49 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.