Skip to main content
Skip table of contents

Connecting to Facebook via SQL

You can use SQL to connect to Facebook in the Data Virtuality Studio or the Code Editor in the Web UI.

Pre-requisites

  • You need your application and credentials for it.

Please refer to the subpages on how to register the Facebook application, and retrieve the credentials.

How to Connect

Run the following statements in the Data Virtuality Studio or the Web UI (remember to enter your credentials):

SQL
CALL SYSADMIN.createConnection (
    name => 'facebook_src'
    ,jbossCLITemplateName => 'ws'
    ,connectionOrResourceAdapterProperties => 'EndPoint=https://graph.facebook.com/v21.0,AccessToken=<AccessToken>'
);;

CALL SYSADMIN.createDataSource (
    name => 'facebook_src'
    ,translator => 'face_book'
    ,modelProperties => 'cleanupMethod=DELETE,jobTimeout=0'
    ,translatorProperties => ''
);;
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.