Query the Facebook Graph API to gather information on different categories of the user profile, e.g. the movies entered by the user or the liked pages.

To get a valid access token, go to https://developers.facebook.com/tools/explorer/ and request a token by logging in with your Facebook credentials. During the process you get to select the permissions associated with the token. Keep those in mind and make sure you only try to query data permitted by the token. The token generated with this tool will expire after one or two hours. To get more information on this refer to the facebook API documentation.

Datasource Type

REST Custom

Datasource Request Parameters

access_token
CODE

Datasource URL

https://graph.facebook.com/v2.8/

Datasource Test URL

/me?fields=id
CODE

Query URL

/me/:category
CODE

Parameter values

e.g. "likes" or "movies"

Converter Example

function convert(json) {
    var result = [];
    var parsedJsonObject = JSON.parse(json);
    var current, index;
    for (index in parsedJsonObject.data) {
        if (parsedJsonObject.hasOwnProperty(index)) {
            current = parsedJsonObject[index];
            result.push({
                'Item Name': current.name,
                'Creation Date': PocketQuery.formatDate(current.created_time,'ddd, MMM Do YYYY, hh:mm')
            });
        }
    }
    return result;
}
CODE