What can you do with Facebook in Etlworks
Create a Facebook app By creating a Facebook app, you are enabling access to Facebook's Graph API. A Facebook app is not an actual application. It is just a set of credentials and access rights linked to your Facebook account. |
Create a Facebook Connection You can pull data from Facebook's Graph API or post to Facebook. You can select either the |
Pull data from Facebook Create a Facebook Feed Connection, which will be used as a source ( |
Post data to Facebook Create a Facebook Update Connection by opening the |
Delete data from Facebook Create a Facebook Update Connection. When configuring the Connection, select one of the |
|
Related resources
Automate a status update in multiple social networks Create Update Connections for multiple networks, for example, a Twitter Update Connection and a Facebook Update Connection. |
Send a content of the file as a payload for an HTTP endpoint Use the following technique to send a file as a payload for an HTTP endpoint. |
Video
How to extract data from business application or well-known API and load into database
|
Related case study
Government contractor Create REST API for loading data in Tableau
|
"A consulting company was hired by the government to develop a data intelligence solution based on the Tableau platform. There are multiple sources of the data, from locally hosted SQL Server database to Google Analytics, Facebook, and third-party web services." |
Connect to Facebook
Create a Facebook app
By creating a Facebook app, you are enabling access to Facebook's Graph API. A Facebook app is not an actual application. It is just a set of credentials and access rights linked to your Facebook account.
Each application has a unique ID
and and a Secret
that can be used to obtain an access token
, which will later be used to access Facebook's Graph API. When creating a Facebook Connection in the Etlworks, the user is required to log in with their actual Facebook credentials (user name and password), but those are never stored in the Etlworks database. Instead, it stores an Access token
, linked to a particular App ID
and a Secret
.
Etlworks includes a built-in Facebook app that provides very limited access to Facebook's Graph API. You must create an app if you want your Facebook Connection to have access to the following rights: user_posts
, user_managed_groups
, user_about_me
, user_actions.news
, user_tagged_places
, user_relationships
, user_birthday
, user_events
, user_website
, user_relationship_details
, user_photos
, user_hometown
, user_likes
, publish_actions
, read_custom_friendlists
, user_location
.
Important:
If you choose to create your own app, in most cases, you will need a new app for each Facebook account you are going to access while using EtIworks Facebook connector.
To create a Facebook app:
Step 1. Log out from your personal Facebook account.
Step 2. Go to https://developers.facebook.com
and log in with the account you are going to be creating the Connection to.
Step 3. Click Add New App
under the My Apps
menu on the top right corner of the screen.
Step 4. In the popup window, enter the app Display Name
and Contact Email
. Pass the security check.
Step 5. Select Facebook Login
under Select Product
and click Set Up
.
Step 6. Click Web
in the next window.
Step 7. Enter the Site URL
in the next window and click Save
.
It is essential to understand what you are going to be entering as a Site URL
.
-
If you are using Etlworks, hosted by Etlworks on any of the Etlworks subdomains, such as
app.etlworks.com
,your_company_name.etlworks.com
, etc., just enterhttps://etlworks.com
. -
If you are hosting Etlworks yourself and are using your own domain, for example,
https://integrator.your_company_name.com
, just enter that URL in theprotocol://domain
format. For example:https://google.com
. -
If you are hosting Etlworks yourself, on localhost, for example,
http://localhost:8080
, then enter the URL in this Formatprotocol://localhost
, and skip the port number. -
If you are using an IP address, for example,
http://192.168.1.100:8080
, then enter the URL in this Formatprotocol://ip_address
, and skip the port number.
Step 8.
At this point, you can copy and paste App ID
and App Secret
. You will be using them to create a Facebook Connection in Etlworks.
Step 9. Go to Settings/Basic
on the left navigational bar and enter the actual domain name in the App Domains
field. Click Save Changes
.
It is very important to understand what you are going to be entering for App Domains
.
-
If you are using Etwlorks, hosted by Etlworks on any of the Etlworks subdomains, such as
app.etworks.com
,your_company_name.etlworks.com
, etc., enter that particular subdomain. For examples:app.etlworks.com
,your_company_name.etlworks.com
. -
If you are hosting Etlworks yourself and are using your own domain, for example
https://integrator.your_company_name.com
, enter that particular domain, including the subdomain. For example:integrator.google.com
. -
If you are hosting Etlworks yourself on localhost, for example,
http://localhost:8080
, just enterlocalhost
. -
If you are using an IP address, for example,
http://192.168.1.100:8080
, enter just the IP address, in this case:192.168.1.100
.
Step 10. Enter https://etlworks.com/docs/privacy-policy/
into the Privacy Policy URL
field and click Save Changes
.
You can enter your own privacy policy URL.
Step 11. Go to App Review
on the left navigational bar and slide Make App Public
to the Yes
position. Select Category
and click Confirm
.
Step 12. If you want this app to access accounts other than the account you used in Step 2, follow the Facebook app submission process. Otherwise, skip this step.
You are done. You can always access your application by opening https://developers.facebook.com
, logging in using the designated Facebook account, and selecting the app from the My Apps
menu.
Create a Facebook Connection
Step 1. Start creating a Facebook Connection by opening the Connections
window, clicking +
, and typing facebook
into the search box:
Step 2. Depending upon whether you will be pulling data from Facebook's Graph API or posting to Facebook, select either the Facebook Feed
or the Facebook Update
Connection.
Step 3. Enter the Authentication parameters. Click Test Connection
to verify that the credentials are working.
App ID
andApp Secret
: Facebook'sApp ID
andApp Secret
are assigned to the Facebook app created by you. You can leave both fields blank. In this case, Etlworks will have access to a very limited subset of Facebook's Graph API. For example, it will not be able to pull public information from the profile, post status updates, etc.Access Token
: clickLogin with Facebook
to receive anAccess Token
from Facebook.
If you are already logged in to Facebook with your personal account (or just a different account), you will need to log out first.
Permissions
: list of permissions required for that specific Facebook app.
Revoke the Access Token
To revoke the Access Token
, click Logout from Facebook
.
An Access Token
is granted for approximately 60 days. Once it expires, the integration Flows with this particular Connection will stop working. The Access Token
will be displayed as expired
and the user will need to Login with Facebook
again to receive a new one.
Step 4. Continue by entering the Connection parameters, which are unique for each type of Connection.
Facebook Feed Connection
A Facebook Feed Connection is used to pull data from Facebook's Graph API.
Common parameters
Feed Type
: Each Facebook feed type is linked to a specific Facebook Graph API endpoint. Pay attention to the hint found in the feed type name. For example,Search places by keywords or center and distance from center
implies that akeyword(s)
, which are entered asQuery parameters
, as well as alocation center
and adistance from center
are required. If the endpoint is not on the list, use theCall any Facebook API
feed type, together with the endpoint name.Include Fields
: an optional, comma-separated list of fields to include in the response. By default, Facebook returns a very limited subset of fields, mostly IDs and names. Other fields are returned as nulls. You have to manually list all the additional fields, such as emails, etc. if you wish to see them in the response.Endpoint name
: an optional Facebook Graph API endpoint name. This parameter is used only ifCall any Facebook API
is selected as theFeed Type
. Learn more about Facebook Graph API endpoints.Query parameters
: use this field mostly forSearch...
feed types. A query parameter is required for some endpoints and ignored by others. If theCall any Facebook API
feed type is selected, enter theQuery parameters
in the format{"key":"value","key":"value"}
.
Filter
ID
: some clearly marked feed types accept an optional ID, such as a User ID, Post ID, Group ID, or Album ID.Since Date
: optional, included start date. The date must be in a format accepted by the PHP strtotime function. For example:yesterday
,now
,next Thursday
,last Monday
,10 October 2017
,+1 day
,+1 week
. etc.Until Date
: optional, included end date. Date must be in a format accepted by the PHP strtotime function. For example:yesterday
,now
,next Thursday
,last Monday
,10 October 2017
,+1 day
,+1 week
. etc.After Date
: optional, excluded start date. Date must be in a format accepted by the PHP strtotime function. For example:yesterday
,now
,next Thursday
,last Monday
,10 October 2017
,+1 day
,+1 week
. etc.Before Date
: optional, excluded end date. Date must be in a format accepted by the PHP strtotime function. For example:yesterday
,now
,next Thursday
,last Monday
,10 October 2017
,+1 day
,+1 week
. etc.Center of Location
: optional, center of the location, for location-based requests, such asSearch places
. Location must be in the formatLatitude,Longitude
. For example:40.4327086,-79.92486689999998
.Distance from the Center of Location
: optional, distance from the center of the location in meters, for the location-based requests, such asSearch places
.Limit
: optional, limit on the number of returned-by API rows.Offset
: optional, start row (offset from the first row) for the response returned by API.Include Summary into Response
: if selected, the summary information (total number of rows, etc.) will be included in the response.
Not all API endpoints support the summary
field.
Include Metadata into response
: if selected, the metadata information (name and types of the fields) will be included in the response.
Not all API endpoints support metadata
field.
Include Hidden Data into response
: if selected, typically hidden data will be included in the response.
Not all API endpoints support the hidden
field.
Show Expired data
: if selected, expired data will be included in the response.
Not all API endpoints support the expired
field.
Include only data with location information
: if selected, only data with location information (for example, checkins) will be included in the response.
Not all API endpoints support the Location
field.
Ordering
: the order of rows in the response.Locale
: optional, locale (country of origin) of the data.
Facebook Update Connection
A Facebook Update Connection is used to post to Facebook and delete data from Facebook.
Common parameters
Action
: type of update. Each action is linked to a specific Facebook GraphPOST
orDELETE API
endpoint. If the endpoint is not on the list, use theCall any Facebook API
action, together with the endpoint name.Endpoint name
: optional, Facebook Graph API endpoint name. This parameter is used only ifCall any Facebook API
is selected as anAction
. Learn more about the Facebook Graph API endpoints.Request Parameters
: the request parameters are required for some endpoints and ignored by others. If theCall any Facebook API
action is selected, enter theQuery parameters
in the format{"key":"value","key":"value"}
.
Post parameters
Message
: a message to post. It can include direct links in the Formathttps://link
.Link
: a link to include, together with the message.Picture
: the URL of a picture to post with the message.Name
: an optional name of the post.Description
: an optional description of the post.Caption
: an optional caption for the posted image.Tags
: an optional comma-separated list of tags for the message.
Additional parameters
ID
: some clearly marked actions accept an optional ID, such as a User ID, Post ID, Friends List ID, Event ID, or Comment ID.Location
: optional, location information for the post. The location must be in the FormatLatitude,Longitude
. For example:40.4327086,-79.92486689999998
.Start Date
: optional, date to start showing the post. The start date must be in the Formatmm/dd/YYYY
.End Date
: optional, date to stop showing the post. The end date must be in the Formatmm/dd/YYYY
.
Publishing status update and privacy settings
Who can see Status Update
: define who can see the status update.Publish Immediately
: if selected, the post will be published immediately.Publish Date
: define date (or date+time) when the post should be published. It will not work ifPublish Immediately
is selected. The date must be in themm/dd/YYYY
Format. For example:02/23/2017
.
Step 5. Optionally, continue by entering the auto-retry parameters.
Retries
: the number of retries allowed for failed execution attempts.Delay between retries
: the delay between retries, in minutes.
Step 6. Click Save
to save the Connection.
Pull data from Facebook
Step 1. Create a Facebook Feed Connection, which will be used as a source (FROM
).
Step 2. Create a destination (TO
) Connection and (if needed) a Format.
Step 3. Start creating the Flow by opening the Flows
window, clicking +
, and typing well-known API to
into the search box:
Step 4. Select the Flow type based on what the destination is going to be. For example, well-known API to file
.
Step 5. Select the Connection created in Step 1 as the source (FROM
) and the Connection/Format created in Step 2, as the destination (TO
). Set the FROM
and TO
fields.
Step 6. Continue by setting the Parameters
and defining the Mapping
.
Post to Facebook
Step 1. Create a Facebook Update Connection.
Step 2. Start creating the Flow by opening the Flows
window, clicking +
, and typing facebook
into the search box. Select the Post Updates on Facebook
Flow type.
Step 3. Continue by selecting the Connection created in Step 1 as a Facebook Update Connection
.
Step 4. Optionally, define the message text in the Parameters
tab. The message can contain {tokens}
, which will be substituted at runtime.
Delete data from Facebook
Step 1. Create a Facebook Update Connection. When configuring the Connection, select one of the Delete...
actions. Enter the required ID. Most of the Delete...
actions require an ID: User ID
, Post ID
, etc.
Step 2. Start creating the Flow by opening the Flows
window, clicking +
, and typing delete files
into the search box. Select the Delete Files
Flow type.
Step 3. Add the transformation and select the Connection created in Step 1 as the source Connection.
Comments
0 comments
Please sign in to leave a comment.