Book Image

Flash Facebook Cookbook

By : James Ford
Book Image

Flash Facebook Cookbook

By: James Ford

Overview of this book

Flash applications are popular and becoming increasingly social. With flash applications for facebook you can tap into a potential audience of half a billion existing users, their connections and affiliations, their uploaded images, posts, comments and more.The Flash Facebook Cookbook is packed with recipes for the Graph API and FQL, used for reading and writing data as well as interacting with Facebook anonymously or on behalf of an authorised Facebook User.The topics covered by the recipes in this Cookbook include working with News feeds, uploading Photos, searching for and plotting Places on a map and much more. The cookbook has recipes ranging from those that work without any authentication with Facebook to those that do, and act on behalf of a user. Packed with recipes that yield practical demonstrations of the Graph API functionality, the Flash Facebook Cookbook is an essential tool for Flash Platform developers.
Table of Contents (18 chapters)
Flash Facebook Cookbook
About the Author
About the Reviewers
Checkins and Facebook Places

Searching for text strings in FQL

FQL isn't as powerful as SQL, and doesn't have access to selectors such LIKE, but it does have built-in support for some basic functions, ones that make it possible to get similar results.

The basic functions available in FQL queries are now(), strpos(), substr(), and strlen(). Only the strpos() function would actually be used in a text search it returns the position of one string, in another string. We can use this function to determine if the text we're looking for exists within the contents of a result's data field, and that's how we can power a simple FQL search.

In this recipe we're going to build an application which can search the status messages of the current user's friends, for occurrences of the text we supply.

Getting ready

In this recipe, we're going to be querying the current user and their friend's status updates, so we'll need to ensure that our application has the "user_status" and "friends_status" extended permissions.

To explore the text searching...