Take the 2-minute tour ×

Is it possible to limit the fields that are returned from Facebook's Batch request API using the JavaScript SDK? For example:

    FB.api('/', 'POST', {
        batch: [
            { method: 'GET', relative_url: 'me'},
    }, function (response) {

The first method of the batch request above returns the full user graph. However, what if I only wanted to fetch a few fields (e.g. first_name and last_name). Something like this would be nice, but doesn't work:

        batch: [
            { method: 'GET', relative_url: 'me', fields: 'first_name,last_name'},
share|improve this question

2 Answers 2

up vote 4 down vote accepted

With some requests you can use the &fields= appended to the end of the url. like /me?fields=first_name,last_name

share|improve this answer
That's exactly what I needed. Thanks. –  Johnny Oshika Sep 6 '11 at 5:10

Use FQL queries to filter out certian fields your require... eg :

SELECT uid, name, first_name, pic_square FROM user WHERE uid = me()

this query will return the user_id, full name, first name and 50x50 pixel profile picture for the user that is currently connected...

share|improve this answer

Your Answer


