GraphQuery
You can use the GraphQuery activity to query social graph.
General
Facebook social graph represents connections between Facebook objects such as users, links, and pages. You can use the GraphQuery activity to search for a specific object and its details. It does not return results across all Facebook objects and focuses on a single object. The GraphQuery requires the ID of the object you query.
The following table describes the configurations on the General tab of the GraphQuery activity.
Field | Module Property? | Visual diff? | Description |
---|---|---|---|
Name | No | Yes |
The name of the activity displayed in the process. The default value is GraphQuery. |
Object | No | Yes | One of the Facebook objects to be queried. |
Query Edges (Connection) | No | Yes | Select this check box to query edge or connections between objects. |
Edge (Connection) | No | Yes | Type of edge or connection to query. Edges are the connections, or relationships, between nodes, such as friendships between people, likes of pages, or the list of comments on a photo.
For example, if you select Post from the Object list, you can use the Edge (Connection) list to select Comments and Likes. See the Facebook Developer Documentation for details. |
Input Item | Data Type | Description |
---|---|---|
graphObjectID | String | Run the process twice to retrieve information, with different values on the
Input tab.
|
maxNumOfPages | Integer | The maximum number of pages that is used to display retrieved records that the process performs. The default value is
1.
If you set it to -1, all the retrieved records that Facebook returns are displayed, regardless of the page size limit. |
pageSize | Integer | Number of items displayed on one page. Default is 25.
If you specify -1 for maxNumOfPages, the value of pageSize is ignored. |
recordOffset | Long | A number that is deducted from the retrieved records number. |
since | String | The start time of what you want to query. |
until | String | The end time of what you want to query. |
BuildInDelay | Integer | The minimum sleep time a process need to run the activity. |
additionalParams | String | Additional parameters, depending on the selection you make on the General tab. For examples on additional parameters, refer to the Output section below. |
token | String | The Facebook authentication token (OAuth token) to access the data. |
Output
- Object - User
CollectionName - None
Syntax (to be entered in the additionalParams field) - fields=birthday,email,first_name
Output - This would retrieve the birthday, email and first name of the userid provided
- Object - User
CollectionName - Feed
Syntax (to be entered in the additionalParams field) - fields= actions,message
Output - This would retrieve actions like Share and Like on the user's feed, and also messages published on the user's feed
- Object - Event
Syntax (to be entered in the additionalParams field) - fields= description,start_time
Output - This would retrieve the description entered for the event and the start time of the event
Fault
The following table describes the error schema elements on the Fault tab of the GraphQuery activity.
Output Item | Data Type | Description |
---|---|---|
FBPluginException | ||
msg | String | This error message is displayed when the Facebook plug-in captures an exception. |
msgCode | String | This error code is displayed when the Facebook plug-in captures an exception. |
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. |