O'Reilly logo

Facebook Cookbook by Jay Goldman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Retrieving All Cookies for a User

Problem

I need to retrieve all of the cookies dropped for a specific user using FQL.

Solution

The simplest query you could use is:

SELECT name, value FROM cookies WHERE uid = $uid;

Discussion

This query is automatically contextual to your app based on the API key you initialized the Facebook client with, so you’ll only be able to pull back cookies dropped by your app.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required