Part II: Poking the API in Java

Encoding PDF-417 2d barcode in Java Part II: Poking the API

Part II: Poking the API
PDF417 Drawer In Java
Using Barcode printer for Java Control to generate, create PDF-417 2d barcode image in Java applications.
Or, results using PHP would be as follows:
Drawing Barcode In Java
Using Barcode generator for Java Control to generate, create bar code image in Java applications.
( [0] => Array ( [movies] => Casablanca, The Shawshank Redemption, It s A Wonderful Life, Babette s Feast, Field of Dreams, Pride & Prejudice (A&E Version), Band of Brothers (HBO), Chariots of Fire, Am lie (Le Fabuleux destin d Am lie Poulain), Groundhog Day, Braveheart, Princess Bride, Les Miserables (1998 version), Signs, The Lord of the Rings trilogy, Benny & Joon, Vertigo, Sense & Sensibility, The Count of Monte Cristo, A Little Princess, Double Indemnity, Forrest Gump, The Incredibles, The African Queen, Henry V (1989 version), The Truman Show [name] => Rich Wagner ) )
Scan Bar Code In Java
Using Barcode scanner for Java Control to read, scan read, scan image in Java applications.
Dealing with array-type fields
PDF 417 Encoder In C#
Using Barcode maker for .NET framework Control to generate, create PDF-417 2d barcode image in .NET applications.
As I discuss in 2, some of the fields are containers (or arrays) of data For example, the event table has a venue field that actually contains six pieces of site-related data, including city, state, country, latitude, and longitude You can retrieve the entire venue array with the following statement:
Creating PDF417 In .NET Framework
Using Barcode generation for .NET Control to generate, create PDF417 image in .NET applications.
SELECT eid, venue FROM event WHERE eid=101022926233
PDF-417 2d Barcode Maker In Visual Basic .NET
Using Barcode generation for .NET framework Control to generate, create PDF417 image in .NET applications.
However, if you want to retrieve just a single venue-related field, you can use dot notation to reference the subfield For example, if you wanted to just retrieve the city, you could modify the statement as follows:
Making Code 128C In Java
Using Barcode generation for Java Control to generate, create Code 128B image in Java applications.
SELECT eid, venuecity FROM event WHERE eid=101022926233
Painting Data Matrix 2d Barcode In Java
Using Barcode encoder for Java Control to generate, create DataMatrix image in Java applications.
Using operators in the WHERE clause
Barcode Maker In Java
Using Barcode creation for Java Control to generate, create bar code image in Java applications.
In the examples I have shown so far, the WHERE conditions have always used the equal sign to specify the matches, such as this:
Printing UPC - 13 In Java
Using Barcode creation for Java Control to generate, create EAN / UCC - 13 image in Java applications.
WHERE pid=12920201292
GS1 128 Printer In Java
Using Barcode maker for Java Control to generate, create GS1-128 image in Java applications.
However, FQL allows you to use several other operators to add power to your queries Consider a scenario in which you want to retrieve all the events of a
Bookland EAN Generator In Java
Using Barcode maker for Java Control to generate, create International Standard Book Number image in Java applications.
5: Exploring FQL: Facebook Query Language
Recognize Data Matrix 2d Barcode In Visual Studio .NET
Using Barcode scanner for Visual Studio .NET Control to read, scan read, scan image in Visual Studio .NET applications.
user 664567292 that have an eid of less than or equal to 7630890908 Here s the query:
Scan EAN-13 Supplement 5 In Visual Studio .NET
Using Barcode recognizer for VS .NET Control to read, scan read, scan image in .NET framework applications.
SELECT eid FROM event_member WHERE uid=664567292 AND eid<= 7630890908
Making DataMatrix In Visual Basic .NET
Using Barcode generator for VS .NET Control to generate, create ECC200 image in .NET applications.
The <= operator is used to retrieve all the eids that are less than or equal to 7630890908 This query also uses the AND operator to add a Boolean condition to the statement ensuring that both conditions are met Table 5-3 lists all the available operators
Bar Code Printer In Visual C#
Using Barcode creation for VS .NET Control to generate, create barcode image in Visual Studio .NET applications.
Table 5-3
EAN-13 Supplement 5 Maker In C#
Using Barcode printer for VS .NET Control to generate, create EAN / UCC - 13 image in .NET framework applications.
Operator
Printing ANSI/AIM Code 39 In VS .NET
Using Barcode drawer for Visual Studio .NET Control to generate, create Code 39 Full ASCII image in Visual Studio .NET applications.
= <> > >= < <= AND, OR, NOT IN
Generating Data Matrix 2d Barcode In .NET
Using Barcode generator for .NET framework Control to generate, create Data Matrix ECC200 image in VS .NET applications.
WHERE Operators
Print Barcode In VB.NET
Using Barcode generator for .NET Control to generate, create barcode image in VS .NET applications.
Description
Equal to Not equal to Greater than Greater than or equal to Less than Less than or equal to Boolean operators Used to create a subquery when an exact value is known for one of indexable fields
Writing More Complex Queries with the IN Operator
Shakespeare s Hamlet may have featured a play within a play, but that s old school now Facebook s FQL can top that with its support for a query within a query You connect queries with the IN clause For example, suppose you wanted to retrieve the name and location of all the events attached to a particular Facebook page (8645672921) The problem is that because the event table has only eid as an indexable field, you cannot use the page ID in a query on the event table
Part II: Poking the API
However, the event_member table provides the link you are looking for I can use the following query to retrieve the eids that are linked with the page ID:
SELECT eid FROM event_member WHERE uid= 8645672921
In PHP, the fuller example would be:
$uid = 8645672921 ; $FQL = SELECT eid FROM event_member WHERE uid=$uid ; $result_set = $facebook->api_client->fql_query($FQL); echo <pre> ; print_r($result_set); echo </pre> ;
Here s the XML output:
<event_member> <eid>7688563787</eid> </event_member> <event_member> <eid>9542531788</eid> </event_member> <event_member> <eid>9610357779</eid> </event_member> <event_member> <eid>7714358414</eid> </event_member> <event_member> <eid>20803947584</eid> </event_member> <event_member> <eid>9405416779</eid> </event_member> <event_member> <eid>11573937673</eid> </event_member> <event_member> <eid>9374611460</eid> </event_member> <event_member> <eid>7630890908</eid> </event_member> </fql_query_response>
5: Exploring FQL: Facebook Query Language
The PHP result set would look like:
Array ( [0] => Array ( [eid] => 7352524755 ) [1] => Array ( [eid] => 11501651899 ) [2] => Array ( [eid] => 7902052238 ) [3] => Array ( [eid] => 8181301283 ) [4] => Array ( [eid] => 8071913190 ) [5] => Array ( [eid] => 9536366299 ) [6] => Array ( [eid] => 8169259038 ) [7] => Array ( [eid] => 20951632704 ) [8] => Array ( [eid] => 7552445899 ) [9] => Array
ALL RIGHTS RESERVED. Business Refinery (c) 2006 - 2010. Terms of Use | Privacy Policy