This processor is used to get data from Facebook using API.
Syncfusion, Facebook, Get, and Rest.
In the following table, the required properties are in bold and other properties are considered optional. The table also indicates any default values.
|Facebook host||Host URL of the Facebook API.|
|API EndPoint||Specifies API endpoint used to share the data in Instagram account.|
Access token to access an API.
Sensitive property: true
|failure||The original flow file will be routed on any type of connection failure, timeout, or general exception.|
|success||The original flow file will be routed upon success (2xx status codes).|
How to create application and generate access token?
The Facebook API requires authentication, specifically requests made on behalf of a user. Authenticated requests require an “access_token”. Access tokens may expire at any time in the future. Follow the given steps to generate an access token:
- Create new application
- Generate access token
Create new application
- The following steps are used to register new application: Go to Facebook developer window. Register a new app by clicking “add a new app” menu in my apps dropdown menu present in header of Facebook developer account.
- Enter the relevant information in application registration page and click “create app ID”.
- After registration, a new app will be created with unique app ID and app secret. This app ID and app secret is used to get “access_token”.
Generate access token
To generate an app access token, make a graph API call,
This call will return an app access token, used in place of a user access token to make API calls as noted above.
There is another method to make graph API calls that doesn’t require a generated app access token. You can pass your app ID and app secret as the access_token parameter when you make a call,
How to get data from Facebook using Data Integration Platform?
In Data Integration GetFacebook processor is used to share data in Facebook.
Following is the overview template to get data from Facebook and store the response in a file.
Step 1: Drag and drop GetFacebook processor into the canvas. Double click to configure the processor.
Give the Endpoint URL, access token and Facebook host from which the response should be retrieved.
Drag and drop PutFile processor. Double click to configure the processor and enter the directory in which the response should be stored as follows,