RealTimeListener
You can use the RealTimeListener activity to subscribe to data changes in Facebook.
An ActiveMatrix BusinessWorks application improves reliability and decreases load times by listening to changes rather than polling the Facebook servers.
- An internal Jetty server is set up with an HTTPS connection URL. The server receives both HTTPS GET requests (for subscription verification) and HTTPS POST requests (for actual changed data) from Facebook.
- The Jetty server makes a POST to the Facebook graph API URL to subscribe to changes on certain Facebook objects, and is ready to handle the verification request.
- Facebook servers make an HTTPS GET request to the callback URL.
- The Jetty server verifies the verify_token value that ActiveMatrix BusinessWorks passes to Facebook and returns the hub.challenge value. This verification technique prevents malicious applications from using the real-time feature as tool for distributed denial-of-service (DDoS) attacks.
General
The following table describes the configurations in the General tab of the RealTimeListener activity.
Field | Module Property? | Visual diff? | Description |
---|---|---|---|
Name | No | Yes | The name of the activity displayed in the process. The default value is RealTimeListener. |
HTTP Connection | Yes | Yes | The IP address (or machine name) where you run this listener, and port of the listener endpoint. |
App ID | Yes | Yes | The ID of your application |
Access Token | Yes | Yes | The access token associated with the application. It is not the user access token. |
Object Type | No | Yes | The object you want to subscribe to. Currently you can subscribe to user and page objects. If you want to subscribe to the page objects, you have to select a page in the Facebook website, as described in Selecting a Facebook Page for RealTimeListener. |
Fields | Yes | Yes | The field and list of connections |
JSON Output | No | Yes | Select this check box to receive the output in .json format. The default value is XML. |
Description
In the Description tab, you can add a short description for the RealTimeListener activity.
Advanced
The following table describes the configurations in the Advanced tab of the RealTimeListener activity.
Field | Module Property? | Description |
---|---|---|
Sequence Key | No | This field contains an XPath expression that specifies which processes should run in order. Process instances with sequencing keys that evaluate to the same value are executed sequentially in the order the process instances were created. |
Custom Job Id | No | This field contains an XPath expression that specifies a custom ID for the process instance. |
Conversations
In the
Conversations tab, you can click the
Add New Conversation
icon to initiate a conversation. A conversation represents two or more related message exchanges in the same process that are correlated by the BusinessWorks engine.
See TIBCO ActiveMatrix BusinessWorks Application Development for more details about how to use conversation.
Output
The following table describes the output elements in the Output tab of the RealTimeListener activity.
Fault
The following table describes the error schema elements in the Fault tab of the RealTimeListener activity.
Output Item | Data Type | Description |
---|---|---|
FBPluginException | ||
msg | String | This error message is displayed when the Facebook plug-in captures an exception for the RealTimeListener activity. |
msgCode | String | This error code is displayed when the Facebook plug-in captures an exception for the RealTimeListener activity. |
FBConnectionException | ||
msg | String | This error message is displayed when the HTTP connection to Facebook is not available, or another connection problem that is unrelated to authorization exists. |
msgCode | String |
This error code is displayed when the HTTP connection to Facebook is not available, or another connection problem that is unrelated to authorization exists. |
FBOauthException | ||
msg | String | This error message is displayed when your token is invalid, expires, or you have no permission to retrieve or publish the information you want to retrieve or publish. |
msgCode | String | This error code is displayed when your token is invalid, expires, or you have no permission to retrieve or publish the information you want to retrieve or publish. |