Name in Java

Make QR Code ISO/IEC18004 in Java Name
Table Name
QR-Code Drawer In Java
Using Barcode creator for Java Control to generate, create QR Code JIS X 0510 image in Java applications.
photo_tag
Barcode Drawer In Java
Using Barcode creator for Java Control to generate, create bar code image in Java applications.
API Equivalent
Read Bar Code In Java
Using Barcode reader for Java Control to read, scan read, scan image in Java applications.
photosget() and photosgetTags()
Printing QR Code In Visual C#
Using Barcode maker for .NET Control to generate, create QR image in VS .NET applications.
profile
QR Maker In VS .NET
Using Barcode encoder for ASP.NET Control to generate, create Quick Response Code image in ASP.NET applications.
user_getInfo() and pagesgetInfo()
Making QR Code ISO/IEC18004 In VS .NET
Using Barcode encoder for Visual Studio .NET Control to generate, create QR Code JIS X 0510 image in .NET applications.
standard_friend_info
QR-Code Creation In VB.NET
Using Barcode printer for .NET Control to generate, create Denso QR Bar Code image in VS .NET applications.
friendsget() and friendsareFriends()
Encoding Barcode In Java
Using Barcode creator for Java Control to generate, create barcode image in Java applications.
standard_user_info
Paint Bar Code In Java
Using Barcode generator for Java Control to generate, create barcode image in Java applications.
usersgetInfo() and usersgetStandardInfo ()
Code 128A Encoder In Java
Using Barcode creator for Java Control to generate, create Code128 image in Java applications.
status
EAN / UCC - 13 Printer In Java
Using Barcode generation for Java Control to generate, create UCC.EAN - 128 image in Java applications.
statusget()
European Article Number 13 Creation In Java
Using Barcode generation for Java Control to generate, create EAN-13 image in Java applications.
stream
RoyalMail4SCC Generation In Java
Using Barcode creator for Java Control to generate, create RoyalMail4SCC image in Java applications.
streamget()
Bar Code Decoder In Java
Using Barcode scanner for Java Control to read, scan read, scan image in Java applications.
stream_filter
UPC - 13 Encoder In Visual Studio .NET
Using Barcode printer for ASP.NET Control to generate, create UPC - 13 image in ASP.NET applications.
streamgetFilters()
Code-39 Creation In .NET Framework
Using Barcode encoder for VS .NET Control to generate, create Code 3/9 image in VS .NET applications.
thread
Draw EAN 128 In .NET
Using Barcode creator for ASP.NET Control to generate, create UCC-128 image in ASP.NET applications.
messagegetThreadsInF older()
Read UPC A In .NET Framework
Using Barcode decoder for .NET Control to read, scan read, scan image in .NET applications.
user
Printing Code 39 In Visual Basic .NET
Using Barcode creator for .NET Control to generate, create Code 39 image in Visual Studio .NET applications.
usersgetInfo() and usersgetStandardInfo ()
Print ANSI/AIM Code 128 In Visual Basic .NET
Using Barcode encoder for Visual Studio .NET Control to generate, create Code128 image in .NET framework applications.
Let s go over a few quick examples Listing 162 shows an API call to
friendsgetAppUsers() and then its equivalent in FQL, using the fqlquery() functionThe friendsgetAppUsers() function returns the user IDs of all the friends of the
currently logged-in user who have authorized the applicationThe FQL query appears to be more complex, so let s walk through it The user table has the is_app_user field, which represents whether a user has authorized the applicationThe friend table defines relationships between two user IDs using fields uid1 and uid2 FQL can only reference a single table in the FROM clause, so we can t use both the friend and user tables in itWe want to end up with a set of user IDs, so we use the user table in FROMThat means that the WHERE clause has to use a subquery to access the friend tableThe subquery gets the IDs of the users who are friends of the logged-in userThe WHERE clause constrains the uids that match the subquery by those users who also have is_app_user set to 1
Listing 162 Simple API Call and Its FQL Equivalent
$appUsers = $facebook->api_client->friends_getAppUsers(); $query = " SELECT uid FROM user WHERE uid IN ( SELECT uid2 FROM friend WHERE uid1 = $loggedInUser ) AND is_app_user = 1"; $appUsers = $facebook->api_client->fql_query( $query );
Previously, we talked about using the IDs returned from friends_getAppUsers() in calls to users_getInfo() to get all their birthdays Listing 163 shows how to implement that in a single FQL query
Listing 163 Combining Multiple API Calls in One FQL Query
SELECT uid, birthday FROM user WHERE uid IN ( SELECT uid2 FROM friend WHERE uid1 = $loggedInUser) AND is_app_user = 1
Notice that all we had to do was add the birthday field to the previous query FQL also lets you access subfields, such as the country from the user s current location Listing 164 shows how to do this for a particular user
Listing 164 Accessing Subfields Directly
SELECT current_locationcountry FROM user WHERE uid = $userID
16 Improving Application Performance and Workflow
Note
Unfortunately, the FQL Tables wiki page does not display the subfields for each table For that, you need to go to the equivalent API function wiki page at http://wikidevelopersfacebook com/indexphp/API
We mentioned that the WHERE clause must reference an indexable field If you wanted to get all the photos for a particular user, you might try to write the query like this:
SELECT pid FROM photo WHERE owner = $userID
However, owner is not an indexable field, so the query fails Instead, you have to use the indexable album ID field, aid, in a subquery Here, we get the photos from albums the user owns:
SELECT link FROM photo WHERE aid IN ( SELECT aid FROM album WHERE owner = $userID )
Subqueries can also nest other subqueries, as Listing 165 demonstratesThis query finds all the photos tagged with application user friends of a particular user Notice how we reuse the FQL query from Listing 162 for getting the friends of a user who are also application users
Listing 165 Nested Subqueries
SELECT pid FROM photo_tag WHERE subject IN ( SELECT uid FROM user WHERE uid IN ( SELECT uid2 FROM friend WHERE uid1 = $userID ) AND is_app_user = 1 )
FQL also supports some functions and operators, as shown in Table 162
Table 162 Table Name
now() rand()
FQL Functions and Operators Description
Returns the current UNIX time Returns a random number Returns the length of a string Returns a concatenation of several strings Returns a substring from a start position with a given length Returns 0 if not found Returns the index of a needle in the haystack Returns -1 if not found Returns a lowercase string
strlen(string) concat(string1, ) substr(string, start, length) strpos(haystack, needle)
lower()
Table 162
upper()
FQL Functions and Operators
Returns an uppercase string FQL supports the following comparison operators: =, >, <, >=, <= FQL supports the following arithmetic operators: +, -, *, / FQL supports the following logical operators: AND, OR, NOT