Facebook Query

On this Page

Snap type:

Read


Description:

This Snap retrieves data from a Facebook account based on the query. The FQL query must be passed, and the Snap fetches the requested fields in the query. See the Facebook Query Language (FQL) Reference at https://developers.facebook.com/docs/reference/fql/ for the table information. Use the Graph API Explorer (https://developers.facebook.com/tools/explorer) in FQL Query mode to help build your queries.

  • Expected upstream Snaps: File reader followed by any file Parser.
  • Expected downstream Snaps: Any file Formatter followed by File Writer.
  • Expected inputFQL Query.
  • Expected output: The output data for the given FQL Query.


Prerequisites:

[None]


Support and limitations:

Works in Ultra Task Pipelines.

Account: 
  • This Snap uses account references created on the Accounts page of SnapLogic Manager to handle access to this endpoint. See Configuring Facebook Accounts for information on setting up this type of account.


Views:
InputThis Snap has exactly one document input view.
OutputThis Snap has exactly one document output view.
ErrorThis Snap has at most one document error view and produces zero or more documents in the view.

Settings

Label


Required. The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline.

FQL Query


Required. The FQL query to fetch data from Facebook.

ExampleSELECT uid, name, pic_square FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me() LIMIT 10) ORDER BY name

Default value: [None]


Snap Execution

Select one of the three modes in which the Snap executes. Available options are:

  • Validate & Execute: Performs limited execution of the Snap, and generates a data preview during Pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during Pipeline runtime.
  • Execute only: Performs full execution of the Snap during Pipeline execution without generating preview data.
  • Disabled: Disables the Snap and all Snaps that are downstream from it.

Example


The example assumes that you have configured & authorized a valid Facebook account (see Configuring Facebook Accounts) to be used with this Snap and you understand how to work with Facebook Query Language (FQL). For more information, see https://developers.facebook.com/docs/reference/fql/.


The following Query Snap employs an FQL query that retrieves picture (pic_square), name, sex, and locale from Facebook accounts of users who are friends of the linked Facebook account. Note that you can only retrieve publicly available information and that you are permitted to. For more information about permissions, see Facebook's FQL reference & Graph API documentation.

After a successful validation of the Snap, you will see a data preview that shows the query results: 


 

Snap Pack History

 Click to view/expand
ReleaseSnap Pack VersionDateTypeUpdates
4.27main12833 StableUpgraded with the latest SnapLogic Platform release.
4.26main11181 StableUpgraded with the latest SnapLogic Platform release.
4.25main9554 StableUpgraded with the latest SnapLogic Platform release.
4.24main8556
 
Stable

Upgraded with the latest SnapLogic Platform release.

4.23main7430
 
StableUpgraded with the latest SnapLogic Platform release.
4.22main6403
 
StableUpgraded with the latest SnapLogic Platform release.
4.21snapsmrc542
 
StableUpgraded with the latest SnapLogic Platform release.
4.20snapsmrc535
 
StableUpgraded with the latest SnapLogic Platform release.
4.19snaprsmrc528
 
StableUpgraded with the latest SnapLogic Platform release.
4.18snapsmrc523
 
StableUpgraded with the latest SnapLogic Platform release.
4.17ALL7402
 
Latest

Pushed automatic rebuild of the latest version of each Snap Pack to SnapLogic UAT and Elastic servers.

4.17snapsmrc515
 
Stable

Added the Snap Execution field to all Standard-mode Snaps. In some Snaps, this field replaces the existing Execute during preview check box.

4.16snapsmrc508
 
StableUpgraded with the latest SnapLogic Platform release.
4.15snapsmrc500
 
StableUpgraded with the latest SnapLogic Platform release.
4.14snapsmrc490
 
StableUpgraded with the latest SnapLogic Platform release.
4.13

snapsmrc486

 
Stable

Upgraded with the latest SnapLogic Platform release.

4.12

snapsmrc480

 
StableUpgraded with the latest SnapLogic Platform release.
4.11snapsmrc465
 
StableUpgraded with the latest SnapLogic Platform release.
4.10

snapsmrc414

 
StableUpgraded with the latest SnapLogic Platform release.
4.9

snapsmrc405

 
Stable

Upgraded with the latest SnapLogic Platform release.

4.8

snapsmrc398

 
StableUpgraded with the latest SnapLogic Platform release.
4.7

snapsmrc382

 
StableUpgraded with the latest SnapLogic Platform release.
4.6

snapsmrc362

 
StableUpgraded with the latest SnapLogic Platform release.
4.5.1

rcmsf231

 
StableUpgraded with the latest SnapLogic Platform release.
4.5rcmsf231 StableUpgraded with the latest SnapLogic Platform release.
4.3.2NA Latest

Resolved an issue with Facebook Query where the error was not routing to error view for "com.restfb.exception.FacebookJsonMappingException".

4.2.2NA

  • Snap Pack updated to work with the latest Facebook API.
  • Deprecated: FetchConnections Snap and UserDetails Snap are no longer supported in the current Facebook API.
  • Search Snap: Post is no longer a supported object type for search.
January 2014NA

Initial release of this Snap Pack with Fetch Connections, Insights Data, Page Data, Query, Search.