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.

Get Facebook Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.