CData Cloud offers access to Facebook across several standard services and protocols, in a cloud-hosted solution. Any application that can connect to a SQL Server database can connect to Facebook through CData Cloud.
CData Cloud allows you to standardize and configure connections to Facebook as though it were any other OData endpoint or standard SQL Server.
This page provides a guide to Establishing a Connection to Facebook in CData Cloud, as well as information on the available resources, and a reference to the available connection properties.
Establishing a Connection shows how to authenticate to Facebook and configure any necessary connection properties to create a database in CData Cloud
Accessing data from Facebook through the available standard services and CData Cloud administration is documented in further details in the CData Cloud Documentation.
Connect to Facebook by selecting the corresponding icon in the Database tab. Required properties are listed under Settings. The Advanced tab lists connection properties that are not typically required.
You can also set the following optional connection properties:
The following subsections describe how to authenticate to Facebook from any available OAuth access flow. For information about creating a custom OAuth application, see Creating a Custom OAuth Application.
When connecting via a Web application, you must create and register a custom OAuth application with Facebook, as described in Creating a Custom OAuth Application. You can then use the Cloud to get and manage the OAuth token values.
Get an OAuth Access Token
To obtain the OAuthAccessToken set the following connection properties:
Now call stored procedures to complete the OAuth exchange:
To connect to data, set the OAuthAccessToken connection property to the access token returned by the stored procedure. When the access token expires after ExpiresIn seconds, call GetOAuthAccessToken again to obtain a new access token.
To configure the driver to use OAuth with a user account on a headless machine, you must authenticate on another device that has an internet browser.
Creating a custom OAuth app is optional in the headless OAuth flow; if you want to skip creating an app, you can connect with the driver's embedded OAuth credentials. However, you might want to create a custom OAuth app to change the information displayed when users log into Facebook to grant permissions to the driver. For information on how to create a custom OAuth application, see Creating a Custom OAuth Application.
Option 1: Obtain and Exchange a Verifier Code
To obtain a verifier code, you must authenticate at the OAuth authorization URL. Follow the steps below to authenticate from the machine with an internet browser and obtain the OAuthVerifier connection property.
Finally, on the headless machine, set the following connection properties to obtain the OAuth authentication values:
Connect to Data
After the OAuth settings file is generated, set the following properties to connect to data:
Option 2: Transfer OAuth Settings
To install the Cloud on another machine, authenticate, and then transfer the resulting OAuth values:
You may find while using the Cloud that Facebook returns an error stating your app does not have permissions to do a certain action. To resolve this, you must generate a new OAuth access token with the required permissions. Set the Scope property in the authentication step. You can find a list of available Facebook permissions here:
http://developers.facebook.com/docs/authentication/permissions/
Permissions that may be required depending on your use case are:
user_birthday, user_photos, user_videos, user_likes, user_hometown, user_location, read_insights, pages_manage_metadata, pages_read_engagement, pages_read_user_content, pages_messaging, business_management, instagram_basic, instagram_manage_insights
Note that in some cases, permissions restrictions might not be due to missing but requestable Facebook OAuth permissions, but instead might be due to missing OAuth app features, like Page Public Content Access or Page Public Metadata Access. These features are tied to the OAuth app as a whole, and cannot be approved or denied for individual OAuth access tokens requested by users. Consider Creating a Custom OAuth Application if you need access to app features not available with the embedded OAuth app.
The following sections compare the two options.
Posting as a Page
After authenticating to Facebook with your user account, you can post, etc. as one of the pages you manage: Set the AuthenticateAsPage property to the Id of the page you want. You can find the Ids for all pages your account has access to by querying the Pages view.
Automatic Page
Facebook has made a number of recent changes that require page tokens for most resources owned by a page. This can be troublesome if you manage multiple pages and want to execute the same queries across all pages (such as retrieving Insights). In order to make this work seamlessly with our tools, we have added a way to automatically detect the page token to use. For this to work, simply do not specify the AuthenticateAsPage. Note that the correct page token can only be resolved if the page id is specified as part of the target in the request. This means for some requests you will still need to manually specify AuthenticateAsPage.
Facebook Insights enables you to search and analyze data about how users are interacting with your Facebook page. Metrics are displayed in read-ony tables called views.
Views are comprised of columns and pseudo-columns. Like tables, they display data in columns and rows, and you can execute a query against a view to refine its results further. (The query will return another read-only table). However, because views are read-only you cannot interact with the data itself unless there is a stored procedure available to modify the data source.
Available views include:
| View Name | Description |
| InsightsByConsumptionType | Retrieves insights sorted by how users consumed your content; for example, playing a video, viewing a photo, or clicking a link. |
| InsightsByFeedbackType | Retrieves insights sorted by feedback type, such as likes or comments. |
| InsightsByLikeSourceType | Retrieves insights sorted by source type; for example, ads, news feedk or page suggestions. |
| InsightsByReactionTotals | Shows reactions to your page sorted by type; for exanple, like, love, wow, haha, sorry, or anger. |
| InsightsByStoryType | Sorts insights by story type, such as user post, page post, checkin, question, or coupon. |
| InsightsByTabType | Sorts insights by tab type, such as About, Ads, or Album. |
| InsightsByUnlikeSourceType | Retrieves insights on actions users take to withdraw a previous "like" of your page. |
| SimpleInsights | Displays simple insights (insights with a single value, given in response to a question) retrieved by your page. |
| VideoInsightsByActionType | Returns video insights as the total number of likes, comments, or shares of that video. Valid only for the entire lifetime of the video posting. |
| VideoInsightsByDistributionType | Displays video insights sorted by distribution type, such as owned, shared, or crossposted. |
| VideoInsightsByReactionType | Retrieves video insights sorted by reaction type, such as like, love, wow, haha, sorty, and anger. |
The sole stored procedure available for manipulating any of the above views is CreateInsightSchema.
For details about Facebook views, including some sample queries, see Views.
For a breakdown of insight mapping by category, see Insight Mapping Reference.
| View or Stored Procedure | Insight Name | Available Periods | Target Type |
| PageAndPostInsights | PAGE_VIEWS_UNIQUE | day, week | page |
| InsightsByPaidStatus | PAGE_STORYTELLERS_BY_STORY_TYPE | day, week, days_28 | page |
| InsightsByPaidStatus | POST_IMPRESSIONS_BY_PAID_NON_PAID | lifetime | page |
| InsightsByPaidStatus | PAGE_IMPRESSIONS_BY_PAID_NON_PAID | day, week, days_28 | page |
| InsightsByPaidStatus | PAGE_IMPRESSIONS_BY_PAID_NON_PAID_UNIQUE | day, week, days_28 | page |
| InsightsByPaidStatus | POST_IMPRESSIONS_BY_PAID_NON_PAID_UNIQUE | lifetime | page |
| InsightsByPaidStatus | PAGE_POSTS_IMPRESSIONS_BY_PAID_NON_PAID | day, week, days_28 | page |
| InsightsByPaidStatus | PAGE_POSTS_IMPRESSIONS_BY_PAID_NON_PAID_UNIQUE | day, week, days_28 | page |
| InsightsByStoryType | PAGE_CONTENT_ACTIVITY_BY_ACTION_TYPE | day, week, days_28 | page |
| InsightsByStoryType | PAGE_IMPRESSIONS_BY_STORY_TYPE | day, week, days_28 | page |
| InsightsByStoryType | PAGE_IMPRESSIONS_BY_STORY_TYPE_UNIQUE | day, week, days_28 | page |
| InsightsByStoryType | POST_IMPRESSIONS_BY_STORY_TYPE | day, week, days_28 | page |
| InsightsByStoryType | POST_IMPRESSIONS_BY_STORY_TYPE_UNIQUE | day, week, days_28 | page |
| InsightsByConsumptionType | PAGE_CONSUMPTIONS_BY_CONSUMPTION_TYPE | day, week, days_28 | page |
| InsightsByConsumptionType | PAGE_CONSUMPTIONS_BY_CONSUMPTION_TYPE_UNIQUE | day, week, days_28 | page |
| InsightsByConsumptionType | POST_CLICKS_BY_TYPE_UNIQUE | day, week, days_28 | page |
| InsightsByLikeSourceType | PAGE_FANS_BY_LIKE_SOURCE | day | page |
| InsightsByLikeSourceType | PAGE_FANS_BY_LIKE_SOURCE_UNIQUE | day | page |
| InsightsByUnlikeSourceType | PAGE_FANS_BY_UNLIKE_SOURCE | day, week, days_28 | page |
| InsightsByUnlikeSourceType | PAGE_FANS_BY_UNLIKE_SOURCE_UNIQUE | day, week, days_28 | page |
| InsightsByFeedbackType | PAGE_NEGATIVE_FEEDBACK_BY_TYPE | day, week, days_28 | page |
| InsightsByFeedbackType | PAGE_NEGATIVE_FEEDBACK_BY_TYPE_UNIQUE | day, week, days_28 | page |
| InsightsByFeedbackType | PAGE_POSITIVE_FEEDBACK_BY_TYPE | day, week, days_28 | page |
| InsightsByFeedbackType | PAGE_POSITIVE_FEEDBACK_BY_TYPE_UNIQUE | day, week, days_28 | page |
| InsightsByFeedbackType | POST_NEGATIVE_FEEDBACK_BY_TYPE | lifetime | post |
| InsightsByFeedbackType | POST_NEGATIVE_FEEDBACK_BY_TYPE_UNIQUE | lifetime | post |
| PageAndPostInsights | PAGE_FAN_ADDS | day | page |
| PageAndPostInsights | PAGE_FAN_ADDS_UNIQUE | day | page |
| PageAndPostInsights | PAGE_FAN_REMOVES | day | page |
| PageAndPostInsights | PAGE_FAN_REMOVES_UNIQUE | day | page |
| PageAndPostInsights | PAGE_FANS | day | page |
| PageAndPostInsights | PAGE_FANS_CITY | day | page |
| PageAndPostInsights | PAGE_FANS_COUNTRY | day | page |
| PageAndPostInsights | PAGE_FANS_LOCALE | day | page |
| PageAndPostInsights | PAGE_IMPRESSIONS | day, week, days_28 | page |
| PageAndPostInsights | PAGE_IMPRESSIONS_PAID | day, week, days_28 | page |
| PageAndPostInsights | PAGE_IMPRESSIONS_VIRAL | day, week, days_28 | page |
| PageAndPostInsights | PAGE_IMPRESSIONS_NONVIRAL | day, week, days_28 | page |
| PageAndPostInsights | POST_IMPRESSIONS | lifetime | post |
| PageAndPostInsights | POST_IMPRESSIONS_PAID | lifetime | post |
| PageAndPostInsights | POST_IMPRESSIONS_VIRAL | lifetime | post |
| PageAndPostInsights | POST_IMPRESSIONS_FAN | lifetime | post |
The following provides a mapping of specific Facebook insights, showing which periods are available for them, what view they can be used from, and what types of targets are available.
| Insight Name | Available Periods | Target Type | Previous Name | |
| PAGE_CONTENT_ACTIVITY_BY_AGE_GENDER_UNIQUE | day, week, days_28 | page | PAGE_STORYTELLERS_BY_AGE_GENDER | |
| PAGE_CONTENT_ACTIVITY_BY_CITY_UNIQUE | day, week, days_28 | page | PAGE_STORYTELLERS_BY_CITY | |
| PAGE_CONTENT_ACTIVITY_BY_COUNTRY_UNIQUE | day, week, days_28 | page | PAGE_STORYTELLERS_BY_COUNTRY | |
| PAGE_CONTENT_ACTIVITY_BY_LOCALE_UNIQUE | day, week, days_28 | page | PAGE_STORYTELLERS_BY_LOCALE | |
| PAGE_IMPRESSIONS_BY_CITY_UNIQUE | day, week, days_28 | page | - | |
| PAGE_IMPRESSIONS_BY_COUNTRY_UNIQUE | day, week, days_28 | page | - | |
| PAGE_IMPRESSIONS_BY_LOCALE_UNIQUE | day, week, days_28 | page | - | |
| PAGE_IMPRESSIONS_BY_AGE_GENDER_UNIQUE | day, week, days_28 | page | - | |
| PAGE_PLACES_CHECKINS_BY_AGE_GENDER | day | page | - | |
| PAGE_PLACES_CHECKINS_BY_LOCALE | day | page | - | |
| PAGE_PLACES_CHECKINS_BY_COUNTRY | day | page | - | |
| PAGE_FANS_GENDER_AGE | day | page | - | |
| PAGE_VIEWS_EXTERNAL_REFERRALS | day | page | - | |
| POST_STORIES_BY_ACTION_TYPE | lifetime | post | - | |
| POST_STORYTELLERS_BY_ACTION_TYPE | lifetime | post | - | |
| PAGE_POSTS_IMPRESSIONS_FREQUENCY_DISTRIBUTION | day, week, days_28 | post | - | |
| POST_VIDEO_RETENTION_GRAPH | lifetime | post | - |
| Insight Name | Available Periods | Target Type | Previous Name | |
| PAGE_ACTIONS_POST_REACTIONS_ANGER_TOTAL | day | page | - | |
| PAGE_ACTIONS_POST_REACTIONS_HAHA_TOTAL | day | page | - | |
| PAGE_ACTIONS_POST_REACTIONS_LIKE_TOTAL | day | page | - | |
| PAGE_ACTIONS_POST_REACTIONS_LOVE_TOTAL | day | page | - | |
| PAGE_ACTIONS_POST_REACTIONS_SORRY_TOTAL | day | page | - | |
| PAGE_ACTIONS_POST_REACTIONS_WOW_TOTAL | day | page | - | |
| PAGE_CONSUMPTIONS | day, week, days_28 | page | - | |
| PAGE_CONSUMPTIONS_UNIQUE | day, week, days_28 | page | - | |
| PAGE_ENGAGED_USERS | day, week, days_28 | page | - | |
| PAGE_FANS_ONLINE | day | page | - | |
| PAGE_FANS_ONLINE_PER_DAY | day | page | - | |
| PAGE_IMPRESSIONS_FREQUENCY_DISTRIBUTION | day, week, days_28 | page | - | |
| PAGE_IMPRESSIONS_ORGANIC | day, week, days_28 | page | - | |
| PAGE_IMPRESSIONS_ORGANIC_UNIQUE | day, week, days_28 | page | - | |
| PAGE_IMPRESSIONS_PAID_UNIQUE | day, week, days_28 | page | - | |
| PAGE_IMPRESSIONS_UNIQUE | day, week, days_28 | page | - | |
| PAGE_IMPRESSIONS_VIRAL_FREQUENCY_DISTRIBUTION | day, week, days_28 | page | - | |
| PAGE_IMPRESSIONS_VIRAL_UNIQUE | day, week, days_28 | page | - | |
| PAGE_NEGATIVE_FEEDBACK | day, week, days_28 | page | - | |
| PAGE_NEGATIVE_FEEDBACK_UNIQUE | day, week, days_28 | page | - | |
| PAGE_PLACES_CHECKIN_MOBILE | day, week, days_28 | page | - | |
| PAGE_PLACES_CHECKIN_MOBILE_UNIQUE | day, week, days_28 | page | - | |
| PAGE_PLACES_CHECKIN_TOTAL | day, week, days_28 | page | - | |
| PAGE_PLACES_CHECKIN_TOTAL_UNIQUE | day, week, days_28 | page | - | |
| PAGE_POST_ENGAGEMENTS | day, week, days_28 | page | - | |
| PAGE_POSTS_IMPRESSIONS | day, week, days_28 | page | - | |
| PAGE_POSTS_IMPRESSIONS_ORGANIC | day, week, days_28 | page | - | |
| PAGE_POSTS_IMPRESSIONS_ORGANIC_UNIQUE | day, week, days_28 | page | - | |
| PAGE_POSTS_IMPRESSIONS_PAID | day, week, days_28 | page | - | |
| PAGE_POSTS_IMPRESSIONS_PAID_UNIQUE | day, week, days_28 | page | - | |
| PAGE_POSTS_IMPRESSIONS_UNIQUE | day, week, days_28 | page | - | |
| PAGE_POSTS_IMPRESSIONS_VIRAL | day, week, days_28 | page | - | |
| PAGE_POSTS_IMPRESSIONS_VIRAL_UNIQUE | day, week, days_28 | page | - | |
| PAGE_CONTENT_ACTIVITY | day, week, days_28 | page | PAGE_STORIES | |
| PAGE_VIDEO_COMPLETE_VIEWS_30S | day, week, days_28 | page | - | |
| PAGE_VIDEO_COMPLETE_VIEWS_30S_AUTOPLAYED | day, week, days_28 | page | - | |
| PAGE_VIDEO_COMPLETE_VIEWS_30S_CLICK_TO_PLAY | day, week, days_28 | page | - | |
| PAGE_VIDEO_COMPLETE_VIEWS_30S_ORGANIC | day, week, days_28 | page | - | |
| PAGE_VIDEO_COMPLETE_VIEWS_30S_PAID | day, week, days_28 | page | - | |
| PAGE_VIDEO_COMPLETE_VIEWS_30S_REPEAT_VIEWS | day, week, days_28 | page | - | |
| PAGE_VIDEO_COMPLETE_VIEWS_30S_UNIQUE | day, week, days_28 | page | - | |
| PAGE_VIDEO_REPEAT_VIEWS | day, week, days_28 | page | - | |
| PAGE_VIDEO_VIEWS | day, week, days_28 | page | - | |
| PAGE_VIDEO_VIEWS_AUTOPLAYED | day, week, days_28 | page | - | |
| PAGE_VIDEO_VIEWS_CLICK_TO_PLAY | day, week, days_28 | page | - | |
| PAGE_VIDEO_VIEWS_ORGANIC | day, week, days_28 | page | - | |
| PAGE_VIDEO_VIEWS_PAID | day, week, days_28 | page | - | |
| PAGE_VIDEO_VIEWS_UNIQUE | day, week, days_28 | page | - | |
| PAGE_VIEWS_TOTAL | day, week, days_28 | page | PAGE_VIEWS | |
| PAGE_VIEWS_LOGGED_IN_TOTAL | day, week, days_28 | page | PAGE_VIEWS_LOGIN | |
| PAGE_VIEWS_LOGGED_IN_UNIQUE | day, week, days_28 | page | PAGE_VIEWS_LOGIN_UNIQUE | |
| PAGE_MEDIA_VIEW | day, week, days_28 | page | PAGE_IMPRESSIONS | |
| PAGE_VIEWS_LOGOUT | day | page | - | |
| PAGE_FOLLOWS | day | page | PAGE_FANS | |
| POST_CLICKS | lifetime | post | POST_CONSUMPTIONS | |
| POST_CLICKS_UNIQUE | lifetime | post | POST_CONSUMPTIONS_UNIQUE | |
| POST_ENGAGED_USERS | lifetime | post | - | |
| POST_IMPRESSIONS_FAN_PAID | lifetime | post | - | |
| POST_IMPRESSIONS_FAN_PAID_UNIQUE | lifetime | post | - | |
| POST_IMPRESSIONS_FAN_UNIQUE | lifetime | post | - | |
| POST_IMPRESSIONS_ORGANIC | lifetime | post | - | |
| POST_IMPRESSIONS_ORGANIC_UNIQUE | lifetime | post | - | |
| POST_IMPRESSIONS_PAID_UNIQUE | lifetime | post | - | |
| POST_IMPRESSIONS_UNIQUE | lifetime | post | - | |
| POST_IMPRESSIONS_VIRAL_UNIQUE | lifetime | post | - | |
| POST_NEGATIVE_FEEDBACK | lifetime | post | - | |
| POST_NEGATIVE_FEEDBACK_UNIQUE | lifetime | post | - | |
| POST_ACTIVITY | lifetime | post | POST_STORIES | |
| POST_ACTIVITY_UNIQUE | lifetime | post | POST_STORYTELLERS | |
| POST_VIDEO_AVG_TIME_WATCHED | lifetime | post | - | |
| POST_VIDEO_COMPLETE_VIEWS_ORGANIC | lifetime | post | - | |
| POST_VIDEO_COMPLETE_VIEWS_ORGANIC_UNIQUE | lifetime | post | - | |
| POST_VIDEO_COMPLETE_VIEWS_PAID | lifetime | post | - | |
| POST_VIDEO_COMPLETE_VIEWS_PAID_UNIQUE | lifetime | post | - | |
| POST_VIDEO_LENGTH | lifetime | post | - | |
| POST_VIDEO_VIEW_TIME | lifetime | post | - | |
| POST_VIDEO_VIEW_TIME_ORGANIC | lifetime | post | - | |
| POST_VIDEO_VIEWS_10S | lifetime | post | - | |
| POST_VIDEO_VIEWS_10S_AUTOPLAYED | lifetime | post | - | |
| POST_VIDEO_VIEWS_10S_CLICKED_TO_PLAY | lifetime | post | - | |
| POST_VIDEO_VIEWS_10S_ORGANIC | lifetime | post | - | |
| POST_VIDEO_VIEWS_10S_PAID | lifetime | post | - | |
| POST_VIDEO_VIEWS_10S_SOUND_ON | lifetime | post | - | |
| POST_VIDEO_VIEWS_10S_UNIQUE | lifetime | post | - | |
| POST_VIDEO_VIEWS_ORGANIC | lifetime | post | - | |
| POST_VIDEO_VIEWS_ORGANIC_UNIQUE | lifetime | post | - | |
| POST_VIDEO_VIEWS_PAID | lifetime | post | - | |
| POST_VIDEO_VIEWS_PAID_UNIQUEPOST_VIDEO_VIEWS_SOUND_ON | lifetime | post | - | |
| POST_REACTIONS_LIKE_TOTAL | lifetime | post | - | |
| POST_REACTIONS_LOVE_TOTAL | lifetime | post | - | |
| POST_REACTIONS_WOW_TOTAL | lifetime | post | - | |
| POST_REACTIONS_HAHA_TOTAL | lifetime | post | - | |
| POST_REACTIONS_SORRY_TOTAL | lifetime | post | - | |
| POST_REACTIONS_ANGER_TOTAL | lifetime | post | - | |
| POST_MEDIA_VIEW | lifetime | post | POST_IMPRESSIONS |
| Insight Name | Available Periods | Target Type | Previous Name |
| POST_CLICKS_BY_TYPE | lifetime | post | POST_CONSUMPTIONS_BY_CONSUMPTION_TYPE |
| Insight Name | Available Periods | Target Type | Previous Name | |
| PAGE_ACTIONS_POST_REACTIONS_TOTAL | day | page | - | |
| POST_REACTIONS_BY_TYPE_TOTAL | day | page | - |
| Insight Name | Available Periods | Target Type | Previous Name | |
| POST_ACTIVITY_BY_ACTION_TYPE | lifetime | post | PAGE_CONTENT_ACTIVITY_BY_ACTION_TYPE | |
| POST_ACTIVITY_BY_ACTION_TYPE_UNIQUE | lifetime | post | - |
| Insight Name | Available Periods | Target Type | Previous Name | |
| PAGE_TAB_VIEWS_LOGIN_TOP_UNIQUE | day, week | page | - | |
| PAGE_TAB_VIEWS_LOGIN_TOP | day, week | page | - | |
| PAGE_TAB_VIEWS_LOGOUT_TOP | day | page | - |
| Insight Name | Available Periods | Target Type | Previous Name | |
| PAGE_VIDEO_VIEW_TIME | day | page | - | |
| TOTAL_VIDEO_VIEWS | lifetime | video | - | |
| TOTAL_VIDEO_VIEWS_UNIQUE | lifetime | video | - | |
| TOTAL_VIDEO_VIEWS_AUTOPLAYED | lifetime | video | - | |
| TOTAL_VIDEO_VIEWS_CLICKED_TO_PLAY | lifetime | video | - | |
| TOTAL_VIDEO_VIEWS_SOUND_ON | lifetime | video | - | |
| TOTAL_VIDEO_COMPLETE_VIEWS | lifetime | video | - | |
| TOTAL_VIDEO_COMPLETE_VIEWS_UNIQUE | lifetime | video | - | |
| TOTAL_VIDEO_COMPLETE_VIEWS_AUTO_PLAYED | lifetime | video | - | |
| TOTAL_VIDEO_COMPLETE_VIEWS_CLICKED_TO_PLAY | lifetime | video | - | |
| TOTAL_VIDEO_10S_VIEWS | lifetime | video | - | |
| TOTAL_VIDEO_10S_VIEWS_UNIQUE | lifetime | video | - | |
| TOTAL_VIDEO_10S_VIEWS_auto_played | lifetime | video | - | |
| TOTAL_VIDEO_10S_VIEWS_CLICKED_TO_PLAY | lifetime | video | - | |
| TOTAL_VIDEO_10S_VIEWS_SOUND_ON | lifetime | video | - | |
| TOTAL_VIDEO_AVG_TIME_WATCHED | lifetime | video | - | |
| TOTAL_VIDEO_VIEW_TOTAL_TIME | lifetime | video | - | |
| TOTAL_VIDEO_IMPRESSIONS | lifetime | video | - | |
| TOTAL_VIDEO_IMPRESSIONS_UNIQUE | lifetime | video | - | |
| TOTAL_VIDEO_IMPRESSIONS_VIRAL_UNIQUE | lifetime | video | - | |
| TOTAL_VIDEO_IMPRESSIONS_VIRAL | lifetime | video | - | |
| TOTAL_VIDEO_IMPRESSIONS_FAN_UNIQUE | lifetime | video | - | |
| TOTAL_VIDEO_IMPRESSIONS_FAN | lifetime | video | - |
| Insight Name | Available Periods | Target Type | Previous Name | |
| TOTAL_VIDEO_STORIES_BY_ACTION_TYPE | lifetime | video | - |
| Insight Name | Available Periods | Target Type | Previous Name | |
| TOTAL_VIDEO_VIEWS_BY_DISTRIBUTION_TYPE | lifetime | video | - | |
| TOTAL_VIDEO_VIEW_TIME_BY_DISTRIBUTION_TYPE | lifetime | video | - |
| Insight Name | Available Periods | Target Type | Previous Name | |
| TOTAL_VIDEO_REACTIONS_BY_TYPE_TOTAL | lifetime | video | - |
See Data Model for how the Cloud exposes Facebook APIs as different relational tables and views. This page offers a summary of permissions that might be required depending on how you use the Cloud.
Access and permissions to Facebook APIs broadly depend on whether you are pulling information for:
For information associated with a User or scoped to a User, access and permission are dependent on the set of permissions (scopes) that the user has approved for the OAuth application that accesses the Facebook API. For information associated with a Page, access and permission are controlled not only by the approvals given by a user to the OAuth application, but also by:
To access information associated with a User, the OAuth application that is used with the Cloud must be able to obtain some or all of the following permissions:
The user must also approve the OAuth application for these permissions when the user signs into Facebook to approve the application's access to their account.
To access information associated with a Page, the OAuth application that is used with the Cloud must be able to obtain some or all of the following permissions:
The user must also approve the OAuth application for these permissions when the user signs into Facebook to approve the application's access to their account.
Additionally, when accessing Page information, depending on what they are trying to access, users might find that they need one of the following Tasks for the Page:
Alternatively, you can use the following features, if approved for an application, to access certain public Page information when the user does not have the requisite Task on the page:
Finally, the status of a Page can also factor into determining what sort of information can be obtained for or from it:
| Table or View Name | User or Non-Page Permissions | Page Permissions | Page Task | Page Feature | |
| Comments | permissions for parent entity | permissions for parent entity, pages_read_engagement, or pages_read_user_content | MODERATE | PPCA | |
| Events | N/A | pages_read_engagement, pages_read_user_content, or pages_manage_metadata | N/A | N/A | |
| Groups | conditionally group_access_member_info | N/A | N/A | N/A | |
| InsightsByConsumptionType | N/A | read_insights or pages_read_engagement | ANALYZE | N/A | |
| InsightsByFeedbackType | N/A | read_insights or pages_read_engagement | ANALYZE | N/A | |
| InsightsByLikeSourceType | N/A | read_insights or pages_read_engagement | ANALYZE | N/A | |
| InsightsByReactionTotals | N/A | read_insights or pages_read_engagement | ANALYZE | N/A | |
| InsightsByStoryType | N/A | read_insights or pages_read_engagement | ANALYZE | N/A | |
| InsightsByTabType | N/A | read_insights or pages_read_engagement | ANALYZE | N/A | |
| InsightsByUnlikeType | N/A | read_insights or pages_read_engagement | ANALYZE | N/A | |
| InstagramAccountInsights | instagram_basic and instagram_manage_insights | N/A | N/A | N/A | |
| Likes | permissions for parent entity | N/A | N/A | N/A | |
| PageAndPostInsights | N/A | read_insights or pages_read_engagement | ANALYZE | N/A | |
| Pages | pages_show_list | pages_read_engagement or pages_read_user_content, pages_show_list | MODERATE | PPCA,PPMA | |
| Photos | user_photos | pages_read_engagement or pages_read_user_content | MODERATE | N/A | |
| Places | user_location | N/A | N/A | N/A | |
| Posts | user_posts | pages_read_engagement or pages_read_user_content | MODERATE, CREATE_CONTENT, or MANAGE | PPCA | |
| Ratings | N/A | pages_read_user_content | MODERATE, CREATE_CONTENT, or MANAGE | N/A | |
| SimpleVideoInsights | N/A | read_insights or pages_read_engagement | ANALYZE | N/A | |
| StoryAttachments | permissions for parent entity | permissions for parent entity | N/A | N/A | |
| TaggedBy | N/A | pages_read_user_content, pages_show_list | MODERATE, CREATE_CONTENT, or MANAGE | N/A | |
| Users | public_profile, user_location | N/A | N/A | N/A | |
| VideoInsightsByActionType | N/A | read_insights or pages_read_engagement | ANALYZE | N/A | |
| VideoInsightsByDistributionType | N/A | read_insights or pages_read_engagement | ANALYZE | N/A | |
| VideoInsightsByReactionType | N/A | read_insights or pages_read_engagement | ANALYZE | N/A | |
| Videos | user_videos or user_posts | pages_read_engagement or pages_read_user_content | MANAGE | PPCA | |
| Wall | user_posts | pages_read_engagement or pages_read_user_content | MODERATE, CREATE_CONTENT, MANAGE | PPCA |
By default, the Cloud attempts to negotiate TLS with the server. The server certificate is validated against the default system trusted certificate store. You can override how the certificate gets validated using the SSLServerCert connection property.
To specify another certificate, see the SSLServerCert connection property.
To authenticate to an HTTP proxy, set the following:
Set the following properties:
The CData Cloud models Facebook APIs as relational Tables, Views, and Stored Procedures. The Cloud uses the Facebook API to process supported filters. The Cloud processes other filters client-side within the Cloud.
Tables describes the available tables.
Views are tables that cannot be modified. Typically, data that are read-only and cannot be updated are shown as views.
Stored Procedures are function-like interfaces to the data source. They can be used to search, update, and modify information in the data source.
The Cloud models the data in Facebook as a list of tables in a relational database that can be queried using standard SQL statements.
| Name | Description |
| Likes | Create, delete, and query the Likes for a Target. Alternatively, lists Pages that the specified User or Page Likes. Authentication is required to use this table. |
| Posts | Create, delete, and query the Posts for a Target based on either the Target or Id. Posts can also be inserted based on a Target, or deleted based on Id. This table requires authentication. |
Create, delete, and query the Likes for a Target. Alternatively, lists Pages that the specified User or Page Likes. Authentication is required to use this table.
Likes is an advanced table and require you to set the Target column in the SQL query.
Likes in Facebook represent the users that like a particular target. The target may be a post, picture, or other type of valid entity that may have likes associated with it.
Note: At this time, the Likes table cannot retrieve likes or other reactions for pages. To retrieve simple insights for pages under the new Page experience from Facebook, see PageAndPostInsights.
When selecting likes, specify a target. The target represents the username or Id of the entity that likes are being retrieved for. For example:
SELECT Id, Name, Picture FROM Likes WHERE Target = '15526475270_410830705612736'
If a user or page is specified as the target for likes, then the pages that the user or page likes will be returned. For example:
SELECT Id, Name, Username, Category FROM Likes WHERE Target = 'facebook'
If no target is specified, the currently authenticated user will be used as the target. In this case, the pages that the authenticated user likes will be returned.
To insert a like or to like something, simply issue an INSERT statement and specify the target you are liking. The target must be an album, checkin, comment, photo, post, status update, or other object that can be liked. For example:
INSERT INTO Likes (Target) VALUES ('123456789_123456789')
Facebook does not allow likes to be updated.
Facebook does not allow likes to be deleted.
| Name | Type | ReadOnly | Description |
| ID [KEY] | String | True |
The Id of a user who likes the target, which may or may not be combined with the target Id. The user Id will be after the final '_'. |
| Target [KEY] | String | False |
The Id or username of the target being liked. This may be a post, page, picture, or other valid id with likes. |
| Name | String | True |
The name of the user who likes the target. May alternatively be the name of a page. |
| Username | String | True |
The username of a page when retrieving pages a page has liked. |
| Picture | String | True |
Picture of the user who likes the target. May alternatively be the picture of a page. |
| Category | String | True |
The category of the user or page. |
| CreatedTime | Datetime | True |
The time the like was created, if available. |
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source. For more information, see the WHERE clause section.
| Name | Type | Description |
| offset | String |
Which result to begin returning results from. Used for manual paging of results. |
Create, delete, and query the Posts for a Target based on either the Target or Id. Posts can also be inserted based on a Target, or deleted based on Id. This table requires authentication.
Posts in Facebook are posts to a user's profile feed. Posts can be made to a user, page, application, group, or event.
Note: Due to a deprecation in the Facebook API, queries to the Comments, Photos, Posts, and Videos views where a user profile is either the defined or default target, no longer return data for the following fields:
When selecting posts, a target may be specified. The target represents a page or another valid entity that may have posts for it. If no target is specified, the authenticated user will be used as the target. For example, to retrieve posts made by a page:
SELECT * FROM Posts WHERE Target = 'PageId'
If you know the post Id, you can specify the Id to obtain information about the specific post. For example:
SELECT * FROM Posts WHERE Id = 'PostId'
When querying posts, elements may be retrieved by specifying either the CreatedTime or the UpdatedTime. For example:
SELECT * FROM Posts WHERE Target = 'facebook' AND CreatedTime >= '1/1/2012' AND CreatedTime <= '2/1/2012'
To insert a post, you will need to specify the Target and Message of the post. For instance:
INSERT INTO Posts (Message, Target) VALUES ('My New Post', 'PageId')
Create a photo post by using the Link or ObjectId columns. With the Link column, specify the accessible URL of an image to add the post to. You can also create video posts:
INSERT INTO Posts (Message, Target, Link) VALUES ('My New Post', 'PageId', 'http://imagerepo.net/testimage.png)'
INSERT INTO Posts (Message, Target, Link) VALUES ('My New Post', 'PageId', 'http://samplevideos.net/newmovie.mp4)'
You can also set local files in the Link column to upload media. Note that you must set UploadLinkedMedia to true for this to work:
INSERT INTO Posts (Message, Target, Link) VALUES ('From Local', 'PageId', 'file://D://test/sample.mp4')
With the ObjectId column, specify the ID of an unpublished photo in your account. To upload a photo without publishing it, use the UploadPhoto stored procedure. Video Ids are not supported:
INSERT INTO Posts (Message, Target, ObjectId) VALUES ('My New Post', 'PageId', '43572')
Facebook does not allow posts to be updated.
Posts can be deleted by issuing a DELETE statement and specifying the Id of the post. Please note that Facebook allows only posts created by your app to be deleted using your app.
| Name | Type | ReadOnly | Description |
| ID [KEY] | String | True |
The Id of the post. |
| Target | String | False |
The Id or username of the target you are retrieving posts for or are posting to. This can be an event, page, or user. |
| FromId | String | True |
Id of the user who made the post. |
| FromName | String | True |
Name of the user who made the post. |
| FromPicture | String | True |
Picture of the user who made the post. |
| FromCategory | String | True |
Category of the user who made the post. FromCategory can only be retrieved if the other From* fields are not selected. |
| ToData | String | True |
An aggregate of users the post was made to. |
| Message | String | False |
The message of the post. A message is required when inserting a post. |
| MessageTags | String | True |
An aggregate of objects tagged in the message such as users, pages, etc. |
| Attachments | String | True |
An aggregate for the attachments of the post. |
| Picture | String | False |
A link to the picture included in the post. |
| FullPicture | String | False |
A link to the original picture included in the post. The one listed in Picture may be a resized smaller version. |
| Icon | String | True |
Link to an icon representing the type of post. |
| Actions | String | True |
An aggregate of available actions on the post such as commenting or liking. |
| CommentsCount | Integer | True |
The number of comments for the post. |
| LikesCount | Integer | True |
The number of times the post has been liked. |
| SharesCount | Integer | True |
The number of times the post has been shared. |
| PlaceId | String | False |
The Id of the location associated with the post, if any. |
| PlaceName | String | True |
The name of the location associated with the post, if any. |
| ApplicationId | String | True |
Id of the application this post came from. |
| ApplicationName | String | True |
Name of the application this post came from. |
| ApplicationCanvasName | String | True |
Information about the application used to create the entity. |
| ApplicationNamespace | String | True |
Information about the application used to create the entity. |
| Story | String | True |
Text of stories not intentionally generated by users, such as those generated when two users become friends; you must have the Include Recent Activity Stories migration enabled in your app to retrieve these stories. Requires the read_stream permission. |
| StoryTags | String | True |
An aggregate of objects (users, pages, etc.) associated with the story. |
| LikesData | String | True |
An aggregate of like data. |
| CommentsData | String | True |
An aggregate of comments for this post. |
| CreatedTime | Datetime | True |
When the post was created. |
| UpdatedTime | Datetime | True |
When the post was last updated. |
| PermalinkUrl | String | True |
The permanent static URL to the post on www.facebook.com |
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source. For more information, see the WHERE clause section.
| Name | Type | Description |
| TaggedUser | String |
If set to an Id or username, it will retrieve posts where the specified user has been tagged. Requires the read_stream permission. |
| LocationUser | String |
If set to an Id or username, it will retrieve location posts where the user has been tagged. Requires the user_photos and user_status permissions. |
| Link | String |
A link to attach to the post. For use with the creation of posts. For post creation, either Link or Message columns are required. |
Views are similar to tables in the way that data is represented; however, views are read-only.
Queries can be executed against a view as if it were a normal table.
| Name | Description |
| Comments | Create, update, delete, and query the Comments for a Target. Comments may also be inserted based on a Target or deleted based on Id. |
| Events | Query the Events for a Target such as a page id. |
| InsightsByConsumptionType | Allows retrieval of insights by consumption type. |
| InsightsByReactionTotals | Allows retrieval of insights by like source type. |
| InsightsByStoryType | Allows retrieval of insights by like story type. |
| InsightsByTabType | Allows retrieval of insights by tab type.. |
| InstagramAccountInsights | Allows you to get insights for an Instagram Business Account. Requires the instagram_basic and instagram_manage_insights scopes. |
| PageAndPostInsights | Allows the retrieval of simple insights with a single value in the response. |
| PageLiveVideos | Live videos on a specified page. This table requires authentication, and the pages_read_engagement (or Page Public Content Access feature if you cannot moderate the page) and pages_show_list permissions. The Page Id must be specified as the Target. |
| Pages | Query the Pages based on the supplied Id. |
| Permissions | Query the Permissions the User has granted the current application. |
| Photos | Query Photos associated with a Target. Accessing Photo information typically requires the user_photos permission. |
| Places | Query the Places based on the supplied Id. Places are stored as Pages in Facebook. |
| PostSponsorTags | Query the Pages that have sponsored a target post. This table requires authentication, and the Post Id must be specified as the Target. |
| Ratings | List of ratings for a Facebook Page. This view requires authentication. |
| SimpleVideoInsights | Allows the retrieval of simple video insights with a single value in the response. |
| StoryAttachments | Query attachments from a post or comment. |
| TaggedBy | Query information about Posts, Statuses, Photos, and other entities that have tagged the User or Page. This view is a derivative of the Wall connection where only entries that have tagged the Target User or Page will be returned. In general it is only available for Pages. |
| Users | Returns basic information about the authenticated user. |
| VideoInsightsByActionType | Allows the retrieval of video insights by story action type. |
| VideoInsightsByDistributionType | Allows the retrieval of video insights by distribution type. |
| VideoInsightsByReactionType | Allows the retrieval of video insights by reaction type. |
| VideoReels | Query reels for a given page. |
| Videos | Query Videos from a Target. Normally requires the user_videos permission. |
| Wall | Query Posts from the Wall of a Target. |
Create, update, delete, and query the Comments for a Target. Comments may also be inserted based on a Target or deleted based on Id.
Comments in Facebook are comments about a specific thing. They are always associated with a target, which is the item the comment is directed toward. For example, this could be a post, a picture, or a video. Using this table, you can list the comments for a specific target and also insert new comments about a target.
Note: Due to a deprecation in the Facebook API, queries to the Comments, Photos, Posts, and Videos views where a user profile is either the defined or default target, no longer return data for the following fields:
When querying comments, either the Target or the Id of the comment may be specified. For example, to retrieve all the comments about a specific post, your SELECT statement could look something like this:
SELECT * FROM Comments WHERE Target = '15526475270_410830705612736'
Alternatively, you can specify the Id to retrieve a specific comment. For example:
SELECT * FROM Comments WHERE Id = '15526475270_410830705612736_5193593'
If no Target or Id is specified, comments will be queried from the posts of the feed of the currently authenticated user or page.
Multiple queries can also be composed together to retrieve comments from posts across multiple Facebook entities. For instance:
SELECT * FROM Comments WHERE Target IN (SELECT Id FROM Posts WHERE Target IN (SELECT Id FROM Pages))
If you are looking for comments for all posts, please consider looking at the Posts table or the Wall view. They contain the columns 'CommentsData' and 'CommentsCount'. 'CommentsCount' can be queried to filter and only select posts (targets) on which a comment has been made:
SELECT * FROM Wall WHERE CommentsCount > 0
| Name | Type | Description |
| ID [KEY] | String | The Id of the comment. |
| Target | String | The Id of the target you are retrieving comments for. This may be an album, checkin, link, note, photo, post, status update, or video. |
| FromId | String | Id of the user who made the comment. |
| FromName | String | Name of the user who made the comment. |
| FromPicture | String | Picture of the user who made the comment. |
| Message | String | The text of the comment. |
| MessageTags | String | Aggregate of tags contained in the message. |
| Likes | Integer | The number of likes the comment has. |
| CommentsCount | Integer | The number of comments in reply to this comment. |
| LikesData | String | Aggregate of likes information on the comment. |
| UserLikes | Boolean | Boolean indicating if the authenticated user likes the comment. |
| CanRemove | Boolean | Boolean indicating if the comment can be removed. |
| Attachments | String | An aggregate for the attachments of the post. |
| CreatedTime | Datetime | The time the comment was created. |
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source. For more information, see the WHERE clause section.
| Name | Type | Description |
| offset | String | Which result to begin returning results from. Used for manual paging of results. |
Query the Events for a Target such as a page id.
Events in Facebook are events created by a user or page that mark a specific date when something will take place. Events may be queried by Target or Id.
When selecting events, a target may be specified. The target represents a page that has created events. By default, this will be the currently authenticated user or page. For example, to retrieve events associated with a page:
SELECT * FROM Events WHERE Target = 'PageId'
If you know the event Id, you may also just specify the Id to obtain information about the specific event. For example:
SELECT * FROM Events WHERE Id = 'EventId'
| Name | Type | Description |
| ID [KEY] | String | The Id of the event. |
| Target | String | The Id or username of the target you are retrieving events for or are posting events to. This may be a page or a user. |
| Name | String | The name of the event. |
| StartTime | Datetime | The start time of the event. |
| EndTime | Datetime | The end time of the event. |
| Timezone | String | The time zone the event will take place in. |
| Description | String | The description of the event. |
| Picture | String | A URL to the picture of the event. |
| OwnerId | String | The Id of the user that created the event. |
| OwnerName | String | The name of the user that created the event. |
| OwnerPicture | String | Picture of the user who created the event. |
| OwnerCategory | String | Category of the owner, if available. |
| Location | String | The location of the event, if specified. |
| LocationId | String | The Id of the location for the event. |
| LocationStreet | String | The street address of the event. |
| LocationCity | String | The the city for the event. |
| LocationState | String | The the state for the event. |
| LocationCountry | String | The the country for the event. |
| LocationZip | String | The the ZIP code of the event. |
| LocationLatitude | String | The latitude of the event. |
| LocationLongitude | String | The longitude of the event. |
| TicketUri | String | A URL to a location to buy tickets for this event. |
| UpdatedTime | Datetime | When the event was last updated. |
| AttendingCount | Integer | Number of people attending the event. |
| DeclinedCount | Integer | Number of people who declined the event. |
| InterestedCount | Integer | Number of people interested in the event. |
| MaybeCount | Integer | Number of people who maybe going to the event. |
| NoreplyCount | Integer | Number of people who did not reply to the event. |
Allows retrieval of insights by consumption type.
Insights by consumption type refers to any insights that can be retrieved from a page or post that measure how users consumed your content.
When selecting insights, a Target must be specified. In addition, an InsightName and Period should always be specified. For instance:
SELECT * FROM InsightsByConsumptionType WHERE Target = 'mypostid' AND InsightName = 'POST_CLICKS_BY_TYPE' AND Period = 'lifetime'
Additionally, StartTime and EndTime can be used to specify a range where insight data should be drawn from:
SELECT * FROM InsightsByConsumptionType WHERE Target = 'mypostid' AND InsightName = 'POST_CLICKS_BY_TYPE' AND Period = 'lifetime' AND EndTime >= '12/1/2015' AND EndTime <= '12/31/2015'
| Name | Type | Description |
| RowNumber [KEY] | Int | The row number of the result. |
| EndTime | Datetime | The most recent date this insight data is relevant for. |
| VideoPlay | Long | Insight column indication the total for the stated consumption type. |
| OtherClicks | Long | Insight column indication the total for the stated consumption type. |
| PhotoView | Long | Insight column indication the total for the stated consumption type. |
| LinkClicks | Long | Insight column indication the total for the stated consumption type. |
| ButtonClicks | Long | Insight column indication the total for the stated consumption type. |
| Target | String | The target of the insight. This must always be specified. |
| InsightName | String | The name of the insight. This must always be specified. The available values are: POST_CLICKS_BY_TYPE |
| Period | String | The period for the insight. This must always be specified.
The allowed values are day, week, days_28, lifetime. |
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source. For more information, see the WHERE clause section.
| Name | Type | Description |
| FromDateTime | String | The earliest time for insight data to have been collected. |
| ToDateTime | String | The latest time for insight data to have been collected. |
Allows retrieval of insights by like source type.
Insights by reaction total type refers to the reaction totals for your page or post.
When selecting insights, a Target must be specified. This should be set to a page or post depending on the InsightName specified. You can set InsightName to 'PAGE_ACTIONS_POST_REACTIONS_TOTAL' or 'POST_REACTIONS_BY_TYPE_TOTAL', by default it will be 'PAGE_ACTIONS_POST_REACTIONS_TOTAL'. For instance:
SELECT * FROM InsightsByReactionTotals WHERE Target = 'mypageid' AND InsightName = 'PAGE_ACTIONS_POST_REACTIONS_TOTAL'
Additionally, StartTime and EndTime can be used to specify a range where insight data should be drawn from:
SELECT * FROM InsightsByReactionTotals WHERE Target = 'mypageid' AND InsightName = 'PAGE_ACTIONS_POST_REACTIONS_TOTAL' AND EndTime >= '12/1/2015' AND EndTime <= '12/31/2015'
| Name | Type | Description |
| RowNumber [KEY] | Int | The row number of the result. |
| EndTime | Date | The most recent date this insight data is relevant for. |
| Like | Long | Total like reactions. |
| Love | Long | Total love reactions. |
| Wow | Long | Total wow reactions. |
| Haha | Long | Total haha reactions. |
| Sorry | Long | Total sorry reactions. |
| Anger | Long | Total anger reactions. |
| Thankful | Long | Total thankful reactions. |
| Pride | Long | Total pride reactions. |
| Care | Long | Total care reactions. |
| Fire | Long | Total fire reactions. |
| Hundred | Long | Total hundred reactions. |
| Target | String | The target of the insight. This must always be specified. |
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source. For more information, see the WHERE clause section.
| Name | Type | Description |
| FromDateTime | String | The earliest time for insight data to have been collected. |
| ToDateTime | String | The latest time for insight data to have been collected. |
| InsightName | String | Insight Name. The available values are: PAGE_ACTIONS_POST_REACTIONS_TOTAL,POST_REACTIONS_BY_TYPE_TOTAL
The default value is PAGE_ACTIONS_POST_REACTIONS_TOTAL. |
Allows retrieval of insights by like story type.
Insights by story type refers to any insights that can be retrieved from a page or post that measure the types of stories that have occurred.
When selecting insights, a Target must be specified. In addition, an InsightName and Period should always be specified. For instance:
SELECT * FROM InsightsByStoryType WHERE Target = 'mypostid' AND InsightName = 'POST_ACTIVITY_BY_ACTION_TYPE' AND Period = 'lifetime'
Additionally, FromDateTime and ToDateTime can be used to specify a range where insight data should be drawn from:
SELECT * FROM InsightsByStoryType WHERE Target = 'mypostid' AND InsightName = 'POST_ACTIVITY_BY_ACTION_TYPE' AND Period = 'lifetime' AND FromDateTime >= '08/20/2025' and ToDateTime <= '09/19/2025'
| Name | Type | Description |
| RowNumber [KEY] | Int | The row number of the result. |
| EndTime | Date | The most recent date this insight data is relevant for. DEPRECATED. To be removed in v26. |
| UserPost | Long | Insight column indication the total for the stated story type. DEPRECATED. To be removed in v26. |
| PagePost | Long | Insight column indication the total for the stated story type. DEPRECATED. To be removed in v26. |
| Checkin | Long | Insight column indication the total for the stated story type. DEPRECATED. To be removed in v26. |
| Fan | Long | Insight column indication the total for the stated story type. DEPRECATED. To be removed in v26. |
| Question | Long | Insight column indication the total for the stated story type. DEPRECATED. To be removed in v26. |
| Coupon | Long | Insight column indication the total for the stated story type. DEPRECATED. To be removed in v26. |
| Event | Long | Insight column indication the total for the stated story type. DEPRECATED. To be removed in v26. |
| Mention | Long | Insight column indication the total for the stated story type. DEPRECATED. To be removed in v26. |
| Other | Long | Insight column indication the total for the stated story type. DEPRECATED. To be removed in v26. |
| Share | Long | Insight column indication the total for the stated story type. |
| Like | Long | Insight column indication the total for the stated story type. |
| Comment | Long | Insight column indication the total for the stated story type. |
| Target | String | The target of the insight. This must always be specified. |
| InsightName | String | The name of the insight. This must always be specified. The available values are: POST_ACTIVITY_BY_ACTION_TYPE, POST_ACTIVITY_BY_ACTION_TYPE_UNIQUE |
| Period | String | The period for the insight. This must always be specified.
The allowed values are day, week, days_28, lifetime. |
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source. For more information, see the WHERE clause section.
| Name | Type | Description |
| FromDateTime | String | The earliest time for insight data to have been collected. |
| ToDateTime | String | The latest time for insight data to have been collected. |
Allows retrieval of insights by tab type..
Insights by tab type refers to any insights that can be retrieved from a page or post that measure what tab was used to view your content.
When selecting insights, a Target must be specified. In addition, an InsightName and Period should always be specified. For instance:
SELECT * FROM InsightsByTabType WHERE Target = 'mypostid' AND InsightName = 'PAGE_TAB_VIEWS_LOGIN_TOP_UNIQUE' AND Period = 'day'
Additionally, StartTime and EndTime can be used to specify a range where insight data should be drawn from:
SELECT * FROM InsightsByTabType WHERE Target = 'mypostid' AND InsightName = 'PAGE_TAB_VIEWS_LOGIN_TOP_UNIQUE' AND Period = 'day' AND EndTime >= '12/1/2015' AND EndTime <= '12/31/2015'
| Name | Type | Description |
| RowNumber [KEY] | Int | The row number of the result. |
| EndTime | Date | The most recent date this insight data is relevant for. |
| About | Long | Insight column indication the total for the tab type. |
| Ads | Long | Insight column indication the total for the tab type. |
| Album | Long | Insight column indication the total for the tab type. |
| AllActivity | Long | Insight column indication the total for the tab type. |
| App | Long | Insight column indication the total for the tab type. |
| Community | Long | Insight column indication the total for the tab type. |
| Events | Long | Insight column indication the total for the tab type. |
| Home | Long | Insight column indication the total for the tab type. |
| Info | Long | Insight column indication the total for the tab type. |
| Insights | Long | Insight column indication the total for the tab type. |
| Jobs | Long | Insight column indication the total for the tab type. |
| Likes | Long | Insight column indication the total for the tab type. |
| Locations | Long | Insight column indication the total for the tab type. |
| Notes | Long | Insight column indication the total for the tab type. |
| Photos | Long | Insight column indication the total for the tab type. |
| PhotosAlbums | Long | Insight column indication the total for the tab type. |
| PhotosStream | Long | Insight column indication the total for the tab type. |
| Posts | Long | Insight column indication the total for the tab type. |
| Profile | Long | Insight column indication the total for the tab type. |
| ProfileAbout | Long | Insight column indication the total for the tab type. |
| ProfileCommunity | Long | Insight column indication the total for the tab type. |
| ProfileHome | Long | Insight column indication the total for the tab type. |
| ProfileInfo | Long | Insight column indication the total for the tab type. |
| ProfileLikes | Long | Insight column indication the total for the tab type. |
| ProfilePhotos | Long | Insight column indication the total for the tab type. |
| ProfilePosts | Long | Insight column indication the total for the tab type. |
| Reviews | Long | Insight column indication the total for the tab type. |
| Timeline | Long | Insight column indication the total for the tab type. |
| Videos | Long | Insight column indication the total for the tab type. |
| Wall | Long | Insight column indication the total for the tab type. |
| Target | String | The target of the insight. This must always be specified. |
| InsightName | String | The name of the insight. This must always be specified. The available values are: PAGE_TAB_VIEWS_LOGIN_TOP_UNIQUE,PAGE_TAB_VIEWS_LOGIN_TOP,PAGE_TAB_VIEWS_LOGOUT_TOP |
| Period | String | The period for the insight. This must always be specified.
The allowed values are day, week. |
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source. For more information, see the WHERE clause section.
| Name | Type | Description |
| FromDateTime | String | The earliest time for insight data to have been collected. |
| ToDateTime | String | The latest time for insight data to have been collected. |
Allows you to get insights for an Instagram Business Account. Requires the instagram_basic and instagram_manage_insights scopes.
| Name | Type | Description |
| RowNumber [KEY] | String | The row number of the result. |
| EndTime | Date | The most recent date this insight data is relevant for. |
| Value | Long | Insight column for a singular value response. |
| Description | String | The period for the insight. This controls how rows will be broken up (by day, week, 28 days, or lifetime). This must always be specified.
The allowed values are day, week, days_28, lifetime. |
| InsightName | String | The name of the insight. This must always be specified. The available values are: IMPRESSIONS,REACH,FOLLOWER_COUNT,EMAIL_CONTACTS,PHONE_CALL_CLICKS,TEXT_MESSAGE_CLICKS,GET_DIRECTIONS_CLICKS,WEBSITE_CLICKS,PROFILE_VIEWS,AUDIENCE_GENDER_AGE,AUDIENCE_COUNTRY,AUDIENCE_CITY,ONLINE_FOLLOWERS |
| InsightBreakdownValue | String | The values for an insight breakdown. Applies to AUDIENCE_GENDER_AGE, AUDIENCE_COUNTRY, AUDIENCE_CITY. |
| Period | String | The period for the insight. This controls how rows will be broken up (by day, week, 28 days, or lifetime). This must always be specified. Only 'lifetime' is valid for AUDIENCE_GENDER_AGE, AUDIENCE_COUNTRY, and AUDIENCE_CITY.
The allowed values are day, week, days_28, lifetime. |
| Timeframe | String | Designates how far to look back for data. Required for AUDIENCE_GENDER_AGE, AUDIENCE_COUNTRY, and AUDIENCE_CITY, and takes the place of FromDateTime and ToDateTime inputs for these insights.
The allowed values are last_14_days, last_30_days, last_90_days, prev_month, this_month, this_week. |
| Target | String | The target of the insight. This value correspond to the InstagramBusinessAccountId of the Pages view. You can also set it to 'Target IN (SELECT InstagramBusinessAccountId FROM Pages)'. This must always be specified. |
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source. For more information, see the WHERE clause section.
| Name | Type | Description |
| FromDateTime | String | The earliest time for insight data to have been collected. |
| ToDateTime | String | The latest time for insight data to have been collected. |
Allows the retrieval of simple insights with a single value in the response.
Page and Post insights that can be retrieved from a page or post. These kinds of insights have a single value in the response and can only be filtered by a few values.
When selecting Page and Post insights, always specify a Target and a Period. To improve performance, an InsightName should be specified as well. For example:
SELECT * FROM PageAndPostInsights WHERE Target = 'mypageid' AND InsightName = 'PAGE_MEDIA_VIEW' AND Period = 'day'
To specify multiple insights, use the IN operator. For example:
SELECT * FROM PageAndPostInsights WHERE Target = 'mypageid' AND InsightName IN ('PAGE_MEDIA_VIEW', 'PAGE_ENGAGED_USERS') AND Period = 'day'
To specify a range within which insight data should be drawn, use StartTime and EndTime. For example:
SELECT * FROM PageAndPostInsights WHERE Target = 'mypageid' AND InsightName = 'PAGE_MEDIA_VIEW' AND Period = 'day' AND EndTime >= '12/1/2015' AND EndTime <= '12/31/2015'
Note: Be aware that not all periods are available for all insights. Some will support the use of day/week/days_28 available, but others may only support lifetime. If you are not sure what periods are supported for the insight of interest, see https://developers.facebook.com/docs/graph-api/reference/insights.
| Name | Type | Description |
| RowNumber [KEY] | Int | The row number of the result. |
| EndTime | Date | The most recent date this insight data is relevant for. |
| Value | Long | Insight column for a singular value response. |
| Target | String | The target of the insight. This must always be specified. |
| InsightName | String | The name of the insight. This can be specified to improve performance. The available values are: PAGE_ACTIONS_POST_REACTIONS_ANGER_TOTAL, PAGE_ACTIONS_POST_REACTIONS_HAHA_TOTAL, PAGE_ACTIONS_POST_REACTIONS_LIKE_TOTAL, PAGE_ACTIONS_POST_REACTIONS_LOVE_TOTAL, PAGE_ACTIONS_POST_REACTIONS_SORRY_TOTAL, PAGE_ACTIONS_POST_REACTIONS_WOW_TOTAL, POST_REACTIONS_LIKE_TOTAL,POST_REACTIONS_LOVE_TOTAL,POST_REACTIONS_WOW_TOTAL,POST_REACTIONS_HAHA_TOTAL,POST_REACTIONS_SORRY_TOTAL,POST_REACTIONS_ANGER_TOTAL, PAGE_IMPRESSIONS_PAID_UNIQUE, PAGE_IMPRESSIONS_UNIQUE, PAGE_IMPRESSIONS_VIRAL_UNIQUE,PAGE_IMPRESSIONS_NONVIRAL_UNIQUE, PAGE_POST_ENGAGEMENTS, PAGE_POSTS_IMPRESSIONS, PAGE_POSTS_IMPRESSIONS_PAID, PAGE_POSTS_IMPRESSIONS_PAID_UNIQUE, PAGE_POSTS_IMPRESSIONS_UNIQUE, PAGE_POSTS_IMPRESSIONS_VIRAL, PAGE_POSTS_IMPRESSIONS_VIRAL_UNIQUE, PAGE_VIDEO_COMPLETE_VIEWS_30S, PAGE_VIDEO_COMPLETE_VIEWS_30S_AUTOPLAYED, PAGE_VIDEO_COMPLETE_VIEWS_30S_CLICK_TO_PLAY, PAGE_VIDEO_COMPLETE_VIEWS_30S_ORGANIC, PAGE_VIDEO_COMPLETE_VIEWS_30S_PAID, PAGE_VIDEO_COMPLETE_VIEWS_30S_REPEAT_VIEWS, PAGE_VIDEO_COMPLETE_VIEWS_30S_UNIQUE, PAGE_VIDEO_REPEAT_VIEWS, PAGE_VIDEO_VIEWS, PAGE_VIDEO_VIEWS_AUTOPLAYED, PAGE_VIDEO_VIEWS_CLICK_TO_PLAY, PAGE_VIDEO_VIEWS_ORGANIC, PAGE_VIDEO_VIEWS_PAID, PAGE_VIDEO_VIEWS_UNIQUE, PAGE_VIEWS_TOTAL, POST_CLICKS,POST_IMPRESSIONS_FAN_UNIQUE, POST_IMPRESSIONS_ORGANIC, POST_IMPRESSIONS_ORGANIC_UNIQUE,POST_IMPRESSIONS_PAID_UNIQUE, POST_IMPRESSIONS_UNIQUE,POST_IMPRESSIONS_VIRAL_UNIQUE, POST_VIDEO_AVG_TIME_WATCHED, POST_VIDEO_COMPLETE_VIEWS_ORGANIC, POST_VIDEO_COMPLETE_VIEWS_ORGANIC_UNIQUE, POST_VIDEO_COMPLETE_VIEWS_PAID, POST_VIDEO_COMPLETE_VIEWS_PAID_UNIQUE, POST_VIDEO_LENGTH, POST_VIDEO_VIEW_TIME, POST_VIDEO_VIEW_TIME_ORGANIC, POST_VIDEO_VIEWS_15S, POST_VIDEO_VIEWS_ORGANIC, POST_VIDEO_VIEWS_ORGANIC_UNIQUE, POST_VIDEO_VIEWS_PAID, POST_VIDEO_VIEWS_PAID_UNIQUE, POST_VIDEO_VIEWS_SOUND_ON,PAGE_FOLLOWS,PAGE_MEDIA_VIEW,POST_MEDIA_VIEW |
| Period | String | The period for the insight. This controls how rows will be broken up (by day, week, 28 days, or lifetime). This must always be specified.
The allowed values are day, week, days_28, lifetime. |
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source. For more information, see the WHERE clause section.
| Name | Type | Description |
| FromDateTime | String | The earliest time for insight data to have been collected. |
| ToDateTime | String | The latest time for insight data to have been collected. |
Live videos on a specified page. This table requires authentication, and the pages_read_engagement (or Page Public Content Access feature if you cannot moderate the page) and pages_show_list permissions. The Page Id must be specified as the Target.
| Name | Type | Description |
| ID [KEY] | String | The Id of the post. |
| Title | String | The title of the live video. |
| Status | String | The status of the LiveVideo. |
| StreamUrl | String | The stream url of the live video. |
| SecureStreamUrl | String | The secure stream url of the live video. Check with your encoder whether this is supported before adapting. |
| EmbedHtml | String | The embed html of the live video. |
| BroadcastStartTime | Datetime | The time the video was initially published. |
| CreationTime | Datetime | The creation time of the live video. |
| DashIngestUrl | String | The dash ingest stream URL of the live video. |
| DashPreviewUrl | String | Preview URL for dash player. |
| Description | String | The description of the live video. |
| FromName | String | The name of the originator of the live video. |
| FromId | String | The id of the originator of the live video. |
| TargetingAgeMax | Integer | The maximum age of viewers to target the video toward. |
| TargetingAgeMin | Integer | The minimum age of viewers to target the video toward. |
| TargetingCountries | String | The countries of viewers to target the video toward. |
| PermalinkUrl | String | The permalink URL of this video on Facebook. |
| VideoId | String | The Id of the video. |
| Target | String | ID of the page of the live videos. |
Query the Pages based on the supplied Id.
Pages in Facebook are pages that are created by a user and may be maintained by one or multiple users. Pages, like users, may be referred to by Id or by screen name.
When querying pages, if nothing is specified then the pages you administrate will be displayed by default. Otherwise, the Id of the page can be specified. For example:
SELECT * FROM Pages WHERE Id = 'facebook'
| Name | Type | Description |
| ID [KEY] | String | The Id of the page. |
| Username | String | The username for the page, if any. |
| Name | String | The name of the page. |
| Category | String | The category of the page. |
| Categories | String | An aggregate of categories associated with the page if multiple categories are available. |
| Link | String | A link to the page. |
| Picture | String | A link to the profile picture of the page for the page. |
| CoverId | String | Id of the cover image for the page. |
| CoverSource | String | The URL to the cover image for the page. |
| CoverOffsetY | String | The y-axis offset of the cover image for the page. |
| CoverOffsetX | String | The x-axis offset of the cover image for the page. |
| About | String | Basic information about the page. |
| Description | String | A description of the page, if available. |
| GeneralInfo | String | General information provided by the page. |
| LocationStreet | String | The street address of the page. |
| LocationCity | String | The city for the page. |
| LocationState | String | The state for the page. |
| LocationCountry | String | The country for the page. |
| LocationZip | String | The ZIP code of the page. |
| LocationLatitude | String | The latitude of the page. |
| LocationLongitude | String | The longitude of the page. |
| StoreNumber | Integer | Unique store number for this location page, if applicable. |
| Phone | String | The phone number of the page, if available. |
| Website | String | A link to the website for the page. |
| Likes | Integer | The number of people who like the page. |
| Checkins | Integer | The total number of users who have checked in to the place associated with the page. |
| TalkingAboutCount | Integer | The number of users talking about the page. |
| WereHereCount | Integer | The number of users who were at the location the page is for, if applicable. |
| CanPost | Boolean | Boolean indicating if the authenticated user can post of the page for the page. |
| IsPublished | Boolean | Boolean indicating if the page for the page has been published. |
| IsCommunityPage | Boolean | Boolean indicating if this is a community page. |
| PublicTransit | String | The public transit available for the page, if any. |
| ParkingStreet | Boolean | Boolean indicating if street parking is available. |
| ParkingLot | Boolean | Boolean indicating if a parking lot is available. |
| ParkingValet | Boolean | Boolean indicating if valet parking is available. |
| PromotionEligible | Boolean | Boosted posts eligibility status. Requires the manage_pages permission and you must be an administrator of the page. |
| PromotionIneligibleReason | String | Reason boosted posts are not eligible. Requires the manage_pages permission and you must be an administrator of the page. |
| Founded | String | When the company is founded. Applicable to companies. |
| Mission | String | The company mission. Applicable to companies. |
| Products | String | The products of this company. Applicable to companies. |
| Hours | String | An aggregate for the hours of operation. Applicable to businesses and places. |
| Attire | String | Dress code of the business. Applicable to restaurants or nightlife. Valid values are Casual, Dressy or Unspecified. |
| AcceptsCashOnly | Boolean | Whether the business accepts only cash as a payment option. Applicable to restaurants or nightlife. |
| AcceptsVisa | Boolean | Whether the business accepts Visa as a payment option. Applicable to restaurants or nightlife. |
| AcceptsAmericanExpress | Boolean | Whether the business accepts American Express as a payment option. Applicable to restaurants or nightlife. |
| AcceptsMasterCard | Boolean | Whether the business accepts MasterCard as a payment option. Applicable to restaurants or nightlife. |
| AcceptsDiscover | Boolean | Whether the business accepts Discover as a payment option. Applicable to restaurants or nightlife. |
| PriceRange | String | Price range of the business. Applicable to restaurants or nightlife. Valid values are \$ (0-10), \$\$ (10-30), \$\$\$ (30-50), \$\$\$\$ (50+), or Unspecified. |
| TakesReservations | Boolean | Whether the restaurant takes reservations. Only applicable to restaurants. |
| AllowsWalkins | Boolean | Whether the restaurant allows walk-ins. Only applicable to restaurants. |
| AllowsGroups | Boolean | Whether the restaurant accommodates groups. Only applicable to restaurants. |
| AllowsKids | Boolean | Whether the restaurant allows kids. Only applicable to restaurants. |
| ProvidesTakeout | Boolean | Whether the restaurant provides a takeout service. Only applicable to restaurants. |
| ProvidesDelivery | Boolean | Whether the restaurant provides a delivery service. Only applicable to restaurants. |
| ProvidesCatering | Boolean | Whether the restaurant provides a catering service. Only applicable to restaurants. |
| HasWaiters | Boolean | Whether the restaurant has waiters. Only applicable to restaurants. |
| HasOutdoorSeating | Boolean | Whether the restaurant has outdoor seating. Only applicable to restaurants. |
| ServesBreakfast | Boolean | Whether the restaurant serves breakfast. Only applicable to restaurants. |
| ServesLunch | Boolean | Whether the restaurant serves lunch. Only applicable to restaurants. |
| ServesDinner | Boolean | Whether the restaurant serves dinner. Only applicable to restaurants. |
| ServesCoffee | Boolean | Whether the restaurant serves coffee. Only applicable to restaurants. |
| ServesDrinks | Boolean | Whether the restaurant serves drinks. Only applicable to restaurants. |
| CulinaryTeam | String | Culinary team of the business. Applicable to restaurants or nightlife. |
| PharmaSafetyInfo | String | Pharmacy safety information. Applicable to pharmaceutical companies. |
| Affiliation | String | Affiliation of this person. Applicable to pages representing people. |
| Birthday | String | Birthday of this person. Applicable to pages representing people. |
| PersonalInfo | String | Personal information. Applicable to pages representing people. |
| PersonalInterests | String | Personal interests. Applicable to pages representing people. |
| ArtistsWeLike | String | Artists the band likes. Applicable to bands. |
| BandInterests | String | Band interests. Applicable to bands. |
| BandMembers | String | Members of the band. Applicable to bands. |
| Bio | String | Biography of the band. Applicable to bands. |
| BookingAgent | String | Booking agent of the band. Applicable to bands. |
| GeneralManager | String | General manager of the business. Applicable to restaurants or nightlife. Applicable to bands. |
| Hometown | String | Hometown of the band. Applicable to bands. |
| PressContact | String | Press contact information of the band. Applicable to bands. |
| RecordLabel | String | Record label of the band. Applicable to bands. |
| Awards | String | Awards information for the film or TV show. Applicable to films and TV shows. |
| DirectedBy | String | The director of the film or TV show. Applicable to films and TV shows. |
| Genre | String | The genre of the film or TV show. Applicable to films and TV shows. |
| Influences | String | Influences on the band. Applicable to bands. |
| PlotOutline | String | The plot outline of the film or TV show. Applicable to films and TV shows. |
| ProducedBy | String | The productor of the film. Applicable to films. |
| ReleaseData | String | The film's release data. Applicable to films and TV shows. |
| ScreenplayBy | String | The screenwriter of the film. Applicable to films and TV shows. |
| Starring | String | The cast of the film or TV show. Applicable to films and TV shows. |
| Studio | String | The studio for the film production. Applicable to films. |
| Network | String | The network the TV show airs on. Applicable to TV shows. |
| Schedule | String | The air schedule of the TV show. Applicable to TV shows. |
| Season | String | The current season of the TV show. Applicable to TV shows. |
| WrittenBy | String | The writer of the TV show. Applicable to TV shows. |
| Built | String | The information about when the vehicle was built. Applicable to vehicles. |
| Features | String | Features of the vehicle. Applicable to vehicles. |
| MPG | String | Miles per gallon for the vehicle. Applicable to vehicles. |
| Members | String | Members of this org. Applicable to pages representing team orgs. |
| InstagramBusinessAccountId | String | The business instagram account id associated with this page. |
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source. For more information, see the WHERE clause section.
| Name | Type | Description |
| offset | String | Which result to begin returning results from. Used for manual paging of results. |
Query the Permissions the User has granted the current application.
| Name | Type | Description |
| PermissionName [KEY] | String | The name of the permission. |
| Status | String | The status of the requested permission. |
Query Photos associated with a Target. Accessing Photo information typically requires the user_photos permission.
Photos in Facebook are photos that are uploaded by a user (for example, to a page) and are part of a photo album.
Note: Due to a deprecation in the Facebook API, queries to the Comments, Photos, Posts, and Videos views where a user profile is either the defined or default target, no longer return data for the following fields:
When querying photos, specify a target. The target represents the user, page, album, or event that photos are being retrieved for. For example:
SELECT * FROM Photos WHERE Target = 'facebook'
If no target is specified, the currently authenticated user will be used as the target.
When querying photos, elements may be retrieved by specifying either the CreatedTime or the UpdatedTime. For example:
SELECT * FROM Photos WHERE Target = 'mytarget' AND CreatedTime >= '1/1/2012' AND CreatedTime <= '10/1/2012'
| Name | Type | Description |
| ID [KEY] | String | The Id of the photo. |
| Target | String | The Id or username of the target you are retrieving posts for or are posting to. This may be an album, event, page, or user. |
| FromId | String | Id of the user who uploaded the photo. |
| FromName | String | Name of the user who uploaded the photo. |
| FromPicture | String | Photo of the user who uploaded the photo. |
| FromCategory | String | Category of the user who uploaded the photo. FromCategory may only be retrieved if the other From* fields are not selected. |
| Link | String | A link to the photo on Facebook. |
| Name | String | The name of the photo. |
| Picture | String | A link a thumbnail of the photo. |
| Source | String | The source image of the photo. |
| Height | Integer | The height of the photo. |
| Width | Integer | The width of the photo. |
| Position | Integer | The position of the photo in the album. |
| Icon | String | A link to the icon Facebook displays when photos are published to the stream. |
| PlaceId | String | The Id of the location associated with the post, if any. |
| PlaceName | String | The name of the location associated with the post, if any. |
| Images | String | An aggregate of four different images for the photo. |
| CommentsCount | Integer | The number of comments for the photo. |
| LikesCount | Integer | The number of times the photo has been liked. |
| CommentsData | String | An aggregate of comments for this photo. |
| LikesData | String | An aggregate of likes data. |
| CreatedTime | Datetime | When the photo was uploaded. |
| UpdatedTime | Datetime | When the photo was last updated. |
Query the Places based on the supplied Id. Places are stored as Pages in Facebook.
Places in Facebook are places that can charted on a map and visited. They will typically contain an address, coordinates, and basic information.
If you know the place Id, you may specify the Id to obtain information about the specific place. For example:
SELECT * FROM Places WHERE Id = '407032649344593'
If no Id is specified, no results will come back.
| Name | Type | Description |
| ID [KEY] | String | The Id of the place. |
| Username | String | Username for the page of the place if any. |
| Name | String | The name of the place. |
| Category | String | The category of the place. |
| Categories | String | An aggregate of categories associated with the page if multiple categories are available. |
| Link | String | A link to the place. |
| LocationStreet | String | The street address of the place. |
| LocationCity | String | The the city for the place. |
| LocationState | String | The the state for the place. |
| LocationCountry | String | The the country for the place. |
| LocationZip | String | The the ZIP code of the place. |
| LocationLatitude | String | The latitude of the place. |
| LocationLongitude | String | The longitude of the place. |
| Phone | String | The phone number of the place, if available. |
| Picture | String | A link to the profile picture of the page for the place. |
| About | String | Basic information about the place. |
| Description | String | A description of the place, if available. |
| Website | String | A link to the website for the place. |
| Likes | Integer | Number of people who like the place. |
| Checkins | Integer | The total number of users who have checked in to the place. |
| TalkingAboutCount | Integer | The number of users talking about the place. |
| CanPost | Boolean | Boolean indicating if the authenticated user can post of the page for the place. |
| IsPublished | Boolean | A boolean indicating if the page for the place has been published. |
| IsCommunityPage | Boolean | Boolean indicating if this is a community Page. |
| PublicTransit | String | The public transit available for the place, if any. |
| ParkingStreet | Boolean | Boolean indicating if street parking is available. |
| ParkingLot | Boolean | Boolean indicating if a parking lot is available. |
| ParkingValet | Boolean | Boolean indicating if valet parking is available. |
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source. For more information, see the WHERE clause section.
| Name | Type | Description |
| Distance | String | Optional input that can be specified if searching places. This is the maximum distance from the specified LocationLatitude and LocationLongitude in meters. |
| offset | String | Which result to begin returning results from. Used for manual paging of results. |
Query the Pages that have sponsored a target post. This table requires authentication, and the Post Id must be specified as the Target.
| Name | Type | Description |
| ID [KEY] | String | The Id of the post. |
| Description | String | A description of the page, if available. |
| Founded | String | When the company was founded. |
| GeneralInfo | String | General information about the page. |
| About | String | Basic information about the page. |
| Name | String | The name of the page. |
| Category | String | The category of the page. |
| FanCount | Integer | The number of fans of the page. |
| Link | String | A link to the page. |
| LocationCity | String | The city for the page. |
| LocationCountry | String | The country for the page. |
| TalkingAboutCount | Integer | The number of users talking about the page. |
| Target | String | ID of the post that has sponsored the pages. |
List of ratings for a Facebook Page. This view requires authentication.
| Name | Type | Description |
| Target | String | The Id or name of the page to retrieve ratings for. |
| CreatedTime | Datetime | When the reviewer rated this object. |
| HasRating | Boolean | Bolean indicating if there was a rating included? (1-5 stars). |
| HasReview | Boolean | Bolean indicating if there was text in the rating. |
| OpenGraphID | String | Id of Open Graph story generated by the rating action. |
| Rating | Integer | Rating (1-5 stars). |
| ReviewText | String | The time the last message was posted in the conversation. |
| ReviewerID | String | Person who rated the object. |
| ReviewerName | String | Person who rated the object. |
Allows the retrieval of simple video insights with a single value in the response.
Simple video insights refers to simple insights that can be retrieved from a video. These kinds of insights have a single value in the response and can only be filtered by a few values.
When selecting simple video insights, a Target must be specified. In addition, an InsightName should always be specified. For instance:
SELECT * FROM SimpleVideoInsights WHERE Target = 'myvideoid' AND InsightName = 'TOTAL_VIDEO_VIEWS'
Note: Unlike other types of insights, video insights are only available for the entire lifetime of the video. Breakdowns in smaller units are not possible.
| Name | Type | Description |
| RowNumber [KEY] | Int | The row number of the result. |
| Value | Long | Insight column for a singular value response. |
| Target | String | The target of the insight. This must always be specified. |
| InsightName | String | The name of the insight. This must always be specified. The available values are: TOTAL_VIDEO_VIEWS, TOTAL_VIDEO_VIEWS_UNIQUE, TOTAL_VIDEO_VIEWS_AUTOPLAYED, TOTAL_VIDEO_VIEWS_CLICKED_TO_PLAY, TOTAL_VIDEO_VIEWS_SOUND_ON, TOTAL_VIDEO_COMPLETE_VIEWS, TOTAL_VIDEO_COMPLETE_VIEWS_UNIQUE, TOTAL_VIDEO_COMPLETE_VIEWS_AUTO_PLAYED, TOTAL_VIDEO_COMPLETE_VIEWS_CLICKED_TO_PLAY, TOTAL_VIDEO_10S_VIEWS, TOTAL_VIDEO_10S_VIEWS_UNIQUE, TOTAL_VIDEO_10S_VIEWS_auto_played, TOTAL_VIDEO_10S_VIEWS_CLICKED_TO_PLAY, TOTAL_VIDEO_10S_VIEWS_SOUND_ON, TOTAL_VIDEO_AVG_TIME_WATCHED, TOTAL_VIDEO_VIEW_TOTAL_TIME, TOTAL_VIDEO_IMPRESSIONS, TOTAL_VIDEO_IMPRESSIONS_UNIQUE, TOTAL_VIDEO_IMPRESSIONS_VIRAL_UNIQUE, TOTAL_VIDEO_IMPRESSIONS_VIRAL, TOTAL_VIDEO_IMPRESSIONS_FAN_UNIQUE, TOTAL_VIDEO_IMPRESSIONS_FAN |
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source. For more information, see the WHERE clause section.
| Name | Type | Description |
| FromDateTime | String | The earliest time for insight data to have been collected. |
| ToDateTime | String | The latest time for insight data to have been collected. |
Query attachments from a post or comment.
StoryAttachments in Facebook are attachments associated with a particular user or page story, like a page post or comment.
When querying StoryAttachments, the Target must be specified and set to that of a post or comment. For example, to retrieve all the attachments for a specific post, your SELECT statement could look something like this:
SELECT * FROM StoryAttachments WHERE Target = '15526475270_410830705612736'
| Name | Type | Description |
| Target | String | The Id or username of the target you are retrieving the wall for. |
| Type | String | The type of post. |
| Link | String | The link attached to the post. |
| Name | String | The name of the link. |
| Caption | String | The caption of the link, which appears beneath the link name. |
| Description | String | A description of the link, appears beneath the link caption. |
| Source | String | A URL to a flash movie or video file embedded within the post. |
| ObjectId | String | The Facebook object Id for an uploaded photo or video. |
Query information about Posts, Statuses, Photos, and other entities that have tagged the User or Page. This view is a derivative of the Wall connection where only entries that have tagged the Target User or Page will be returned. In general it is only available for Pages.
| Name | Type | Description |
| ID [KEY] | String | The Id of the entity that has tagged the user or page. |
| Target | String | The Id or username of the user you are retrieving from. |
| FromId | String | Id of the user who made the post. |
| FromName | String | Name of the user who made the post. |
| FromPicture | String | Picture of the user who made the post. |
| Message | String | The message of the post or status if available. |
| CommentsCount | Integer | The number of comments for the post. |
| LikesCount | Integer | The number of times the post has been liked. |
| SharesCount | Integer | The number of times the post has been shared. |
| CreatedTime | Datetime | When the post was created. |
| UpdatedTime | Datetime | When the post was last updated. |
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source. For more information, see the WHERE clause section.
| Name | Type | Description |
| offset | String | Which result to begin returning results from. Used for manual paging of results. |
Returns basic information about the authenticated user.
Users in Facebook are the various user accounts on Facebook.
When selecting users, an Id must be specified. For example:
SELECT * FROM Posts WHERE Id = 'UserId'
If an Id is not specified, the information for the currently logged in user will be returned.
| Name | Type | Description |
| ID [KEY] | String | The Id of the user. |
| Name | String | The full name of the user. |
| Picture | String | Picture of the user. |
| FirstName | String | The first name of the user. |
| MiddleName | String | The middle name of the user. |
| LastName | String | The last name of the user. |
| Birthday | String | The birthday of the user. Requires the user_birthday permission. |
| String | The email address of the user. Requires the email permission. | |
| HometownName | String | The hometown name of the user. Requires the user_hometown permission. |
| HometownId | String | The hometown name of the user. Requires the user_hometown permission. |
| LocationName | String | The current city name of the user. Requires the user_location permission. |
| LocationId | String | The current city Id of the user. Requires the user_location permission. |
Allows the retrieval of video insights by story action type.
Video insights by action type refers to video insights that can be retrieved that detail totals for types of stories.
When selecting video insights, a Target must be specified.
SELECT * FROM VideoInsightsByActionType WHERE Target = 'myvideoid'
Note: Unlike other types of insights, video insights are only available for the entire lifetime of the video. Separation into smaller units is not possible.
| Name | Type | Description |
| RowNumber [KEY] | Int | The row number of the result. |
| Like | Long | Total likes. |
| Comment | Long | Total comments. |
| Share | Long | Total shares. |
| Target | String | The target of the insight. This is a video and must always be specified. |
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source. For more information, see the WHERE clause section.
| Name | Type | Description |
| FromDateTime | String | The earliest time for insight data to have been collected. |
| ToDateTime | String | The latest time for insight data to have been collected. |
Allows the retrieval of video insights by distribution type.
Video insights by reaction type refers to video insights that offer information on views your video got from different distribution sources.
When selecting video insights, a Target must be specified. In addition, an InsightName should always be specified. For instance:
SELECT * FROM VideoInsightsByDistributionType WHERE Target = 'myvideoid' AND InsightName = 'TOTAL_VIDEO_VIEWS_BY_DISTRIBUTION_TYPE'
Note: Unlike other types of insights, video insights are only available for the entire lifetime of the video. Separation into smaller units is not possible.
| Name | Type | Description |
| RowNumber [KEY] | Int | The row number of the result. |
| Page_Owned | Long | Views that were owned by the page. |
| Shared | Long | Views coming from shares. |
| Crossposted | Long | Views coming from posts that were crossposted. |
| Target | String | The target of the insight. This is a video and must always be specified. |
| InsightName | String | The name of the insight. This must always be specified. The available values are: TOTAL_VIDEO_VIEWS_BY_DISTRIBUTION_TYPE,TOTAL_VIDEO_VIEW_TIME_BY_DISTRIBUTION_TYPE |
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source. For more information, see the WHERE clause section.
| Name | Type | Description |
| FromDateTime | String | The earliest time for insight data to have been collected. |
| ToDateTime | String | The latest time for insight data to have been collected. |
Allows the retrieval of video insights by reaction type.
Video insights by reaction type refers to video insights that can be measured by the type of reaction.
When selecting video insights, a Target must be specified. For instance:
SELECT * FROM VideoInsightsByReactionType WHERE Target = 'myvideoid'
Note: Unlike other types of insights, video insights are only available for the entire lifetime of the video. Separation into smaller units is not possible.
| Name | Type | Description |
| RowNumber [KEY] | Int | The row number of the result. |
| Like | Long | Total like reactions. |
| Love | Long | Total love reactions. |
| Wow | Long | Total wow reactions. |
| Haha | Long | Total haha reactions. |
| Sorry | Long | Total sorry reactions. |
| Anger | Long | Total anger reactions. |
| Target | String | The target of the insight. This is a video and must always be specified. |
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source. For more information, see the WHERE clause section.
| Name | Type | Description |
| FromDateTime | String | The earliest time for insight data to have been collected. |
| ToDateTime | String | The latest time for insight data to have been collected. |
Query reels for a given page.
| Name | Type | Description |
| ID [KEY] | String | The Id of the video. |
| Target | String | The Id or username of the target you are retrieving videos for. |
| Description | String | A description of the video. |
| Published [KEY] | Boolean | Whether a post about this reel is published. |
| VideoStatus [KEY] | String | Status attributes of a video. |
| UploadingPhaseStatus [KEY] | String | Status attributes of a video. |
| ProcessingPhaseStatus [KEY] | String | Status attributes of a video. |
| PublishingPhaseStatus [KEY] | String | Status attributes of a video. |
| PublishingPhasePublishStatus [KEY] | String | Status attributes of a video. |
| PublishingPhasePublishTime [KEY] | String | Status attributes of a video. |
| Title [KEY] | String | The video title or caption. |
| Views [KEY] | Long | The public view count of the video. |
| Place [KEY] | String | Place info. |
| PrivacyAllow [KEY] | String | Privacy setting for the video. |
| PrivacyDeny [KEY] | String | Privacy setting for the video. |
| PrivacyDescription [KEY] | String | Privacy setting for the video. |
| PrivacyFriends [KEY] | String | Privacy setting for the video. |
| PrivacyNetworks [KEY] | String | Privacy setting for the video. |
| PrivacyValue [KEY] | String | Privacy setting for the video. |
| FromId | String | The Id of the user who uploaded the video. |
| FromName | String | The name of the user who uploaded the video. |
| FromPicture | String | The picture of the user who uploaded the video. |
| FromCategory | String | The category of the user who uploaded the video. FromCategory may only be retrieved if the other From* fields are not selected. |
| Picture | String | The URL for the thumbnail of the video. |
| Source | String | The URL to the raw, playable video file. |
| EmbedHtml | String | The HTML element that may be embedded in a Web page to play the video. |
| Icon | String | The icon that Facebook displays when videos are published to the Feed. |
| Format | String | An aggregate of four different formats for the video. |
| Tags | String | An aggregate of users tagged in the video, if any. |
| CommentsCount | Integer | The number of comments for the video. |
| LikesCount | Integer | The number of times the video has been liked. |
| CommentsData | String | An aggregate of comments for the video. |
| CreatedTime | Datetime | When the video was uploaded. |
| UpdatedTime | Datetime | When the video was last updated. |
Query Videos from a Target. Normally requires the user_videos permission.
Videos in Facebook are videos that have been uploaded by a user or to a page on Facebook.
Note: Due to a deprecation in the Facebook API, queries to the Comments, Photos, Posts, and Videos views where a user profile is either the defined or default target, no longer return data for the following fields:
When selecting videos, specify a target. The target represents the user or page who uploaded the video. If no target is specified, the currently authenticated user will be used as the target. For example:
SELECT * FROM Videos WHERE Target = 'facebook'
If you know the Id, you can specify the Id to obtain information about the specific video. For example:
SELECT * FROM Videos WHERE Id = 'VideoId'
When querying videos, retrieve elements by specifying either the CreatedTime or the UpdatedTime. For example:
SELECT * FROM Videos WHERE Target = 'mytarget' AND CreatedTime >= '1/1/2012' AND CreatedTime <= '10/1/2012'
| Name | Type | Description |
| ID [KEY] | String | The Id of the video. |
| Target | String | The Id or username of the target you are retrieving videos for. |
| FromId | String | The Id of the user who uploaded the video. |
| FromName | String | The name of the user who uploaded the video. |
| FromPicture | String | The picture of the user who uploaded the video. |
| FromCategory | String | The category of the user who uploaded the video. FromCategory may only be retrieved if the other From* fields are not selected. |
| Description | String | A description of the video. |
| Picture | String | The URL for the thumbnail of the video. |
| Source | String | The URL to the raw, playable video file. |
| EmbedHtml | String | The HTML element that may be embedded in a Web page to play the video. |
| Icon | String | The icon that Facebook displays when videos are published to the Feed. |
| Format | String | An aggregate of four different formats for the video. |
| TagsData | String | An aggregate of users tagged in the video, if any. |
| CommentsCount | Integer | The number of comments for the video. |
| LikesCount | Integer | The number of times the video has been liked. |
| CommentsData | String | An aggregate of comments for the video. |
| CreatedTime | Datetime | When the video was uploaded. |
| UpdatedTime | Datetime | When the video was last updated. |
Query Posts from the Wall of a Target.
Walls in Facebook are a collection of the various posts and updates made to a user's profile or wall.
When selecting from a wall, specify a target. The target represents the user, page, application, or other valid entity that may have a wall associated with it. If no target is specified, the currently authenticated user will be used as the target. For example:
SELECT * FROM Wall WHERE Target = 'facebook'
When querying the wall, elements may be retrieved by specifying either the CreatedTime or the UpdatedTime. For example:
SELECT * FROM Wall WHERE Target = 'facebook' AND CreatedTime >= '1/1/2012' AND CreatedTime <= '2/1/2012'
While the wall may not be directly inserted to, you may post to a wall by issuing an INSERT with the correct target using the Posts table.
| Name | Type | Description |
| ID [KEY] | String | The Id of the post. |
| Target | String | The Id or username of the target you are retrieving the wall for. |
| FromId | String | Id of the user who made the post. |
| FromName | String | Name of the user who made the post. |
| FromPicture | String | Picture of the user who made the comment. |
| FromCategory | String | Category of the user who made the post. FromCategory may only be retrieved if the other From* fields are not selected. |
| ToData | String | An aggregate of users the post was made to. |
| Message | String | The message of the post. |
| MessageTags | String | An aggregate of objects tagged in the message such as Users, Pages, etc. |
| Picture | String | A link to the picture included in the post. |
| Icon | String | Link to an icon representing the type of post. |
| Actions | String | An aggregate of available actions on the post (such as commenting or liking). |
| CommentsCount | Integer | The number of comments for the post. |
| LikesCount | Integer | The number of times the post has been liked. |
| SharesCount | Integer | The number of times the post has been shared. |
| PlaceId | String | The Id of the location associated with the post, if any. |
| PlaceName | String | The name of the location associated with the post, if any. |
| Attachments | String | An aggregate for the attachments of the post. |
| ApplicationId | String | Id of the application this post came from. |
| ApplicationNamespace | String | Information about the application used to create the entity. |
| Story | String | Text of stories not intentionally generated by users, such as those generated when two users become friends; you must have the 'Include recent activity stories' migration enabled in your app to retrieve these stories. |
| StoryTags | String | An aggregate of objects (users, pages, etc.) associated with the story. |
| LikesData | String | An aggregate of like data. |
| CommentsData | String | An aggregate of comments for this post. |
| CreatedTime | Datetime | When the post was created. |
| UpdatedTime | Datetime | When the post was last updated. |
Stored procedures are function-like interfaces that extend the functionality of the Cloud beyond simple SELECT/INSERT/UPDATE/DELETE operations with Facebook.
Stored procedures accept a list of parameters, perform their intended function, and then return any relevant response data from Facebook, along with an indication of whether the procedure succeeded or failed.
| Name | Description |
| CreateInsightSchema | Creates a schema file for an insight. |
Creates a schema file for an insight.
| Name | Type | Description |
| InsightName | String | The name of the insight to create a table for.
The allowed values are PAGE_ENGAGED_USERS, PAGE_FANS_GENDER_AGE, PAGE_FANS_ONLINE, PAGE_FANS_ONLINE_PER_DAY, PAGE_IMPRESSIONS_BY_AGE_GENDER_UNIQUE, PAGE_IMPRESSIONS_BY_CITY_UNIQUE, PAGE_IMPRESSIONS_BY_COUNTRY_UNIQUE, PAGE_IMPRESSIONS_BY_LOCALE_UNIQUE, PAGE_IMPRESSIONS_FREQUENCY_DISTRIBUTION, PAGE_IMPRESSIONS_ORGANIC, PAGE_IMPRESSIONS_ORGANIC_UNIQUE, PAGE_IMPRESSIONS_PAID_UNIQUE, PAGE_IMPRESSIONS_UNIQUE, PAGE_IMPRESSIONS_VIRAL_FREQUENCY_DISTRIBUTION, PAGE_IMPRESSIONS_VIRAL_UNIQUE, PAGE_NEGATIVE_FEEDBACK, PAGE_NEGATIVE_FEEDBACK_UNIQUE, PAGE_PLACES_CHECKIN_MOBILE, PAGE_PLACES_CHECKIN_MOBILE_UNIQUE, PAGE_PLACES_CHECKIN_TOTAL, PAGE_PLACES_CHECKIN_TOTAL_UNIQUE, PAGE_PLACES_CHECKINS_BY_AGE_GENDER, PAGE_PLACES_CHECKINS_BY_COUNTRY, PAGE_PLACES_CHECKINS_BY_LOCALE, PAGE_POSTS_IMPRESSIONS, PAGE_POSTS_IMPRESSIONS_FREQUENCY_DISTRIBUTION, PAGE_POSTS_IMPRESSIONS_ORGANIC, PAGE_POSTS_IMPRESSIONS_ORGANIC_UNIQUE, PAGE_POSTS_IMPRESSIONS_PAID, PAGE_POSTS_IMPRESSIONS_PAID_UNIQUE, PAGE_POSTS_IMPRESSIONS_UNIQUE, PAGE_POSTS_IMPRESSIONS_VIRAL, PAGE_POSTS_IMPRESSIONS_VIRAL_UNIQUE, PAGE_STORIES, PAGE_STORIES_BY_STORY_TYPE, PAGE_STORYTELLERS, PAGE_CONTENT_ACTIVITY_BY_AGE_GENDER_UNIQUE, PAGE_CONTENT_ACTIVITY_BY_CITY_UNIQUE, PAGE_CONTENT_ACTIVITY_BY_COUNTRY_UNIQUE, PAGE_CONTENT_ACTIVITY_BY_LOCALE_UNIQUE, PAGE_STORYTELLERS_BY_STORY_TYPE, PAGE_TAB_VIEWS_LOGIN_TOP, PAGE_TAB_VIEWS_LOGIN_TOP_UNIQUE, PAGE_TAB_VIEWS_LOGOUT_TOP, PAGE_VIDEO_COMPLETE_VIEWS_30S, PAGE_VIDEO_COMPLETE_VIEWS_30S_AUTOPLAYED, PAGE_VIDEO_COMPLETE_VIEWS_30S_CLICK_TO_PLAY, PAGE_VIDEO_COMPLETE_VIEWS_30S_ORGANIC, PAGE_VIDEO_COMPLETE_VIEWS_30S_PAID, PAGE_VIDEO_COMPLETE_VIEWS_30S_REPEAT_VIEWS, PAGE_VIDEO_COMPLETE_VIEWS_30S_UNIQUE, PAGE_VIDEO_REPEAT_VIEWS, PAGE_VIDEO_VIEW_TIME, PAGE_VIDEO_VIEWS, PAGE_VIDEO_VIEWS_AUTOPLAYED, PAGE_VIDEO_VIEWS_CLICK_TO_PLAY, PAGE_VIDEO_VIEWS_ORGANIC, PAGE_VIDEO_VIEWS_PAID, PAGE_VIDEO_VIEWS_UNIQUE, PAGE_VIEWS, PAGE_VIEWS_EXTERNAL_REFERRALS, PAGE_VIEWS_LOGIN, PAGE_VIEWS_LOGIN_UNIQUE, PAGE_VIEWS_LOGOUT, PAGE_VIEWS_UNIQUE, POST_CONSUMPTIONS, POST_CONSUMPTIONS_BY_TYPE, POST_CONSUMPTIONS_BY_TYPE_UNIQUE, POST_CONSUMPTIONS_UNIQUE, POST_ENGAGED_USERS, POST_IMPRESSIONS_FAN_PAID, POST_IMPRESSIONS_FAN_PAID_UNIQUE, POST_IMPRESSIONS_FAN_UNIQUE, POST_IMPRESSIONS_ORGANIC, POST_IMPRESSIONS_ORGANIC_UNIQUE, POST_IMPRESSIONS_PAID_UNIQUE, POST_IMPRESSIONS_UNIQUE, POST_IMPRESSIONS_VIRAL_UNIQUE, POST_NEGATIVE_FEEDBACK, POST_NEGATIVE_FEEDBACK_UNIQUE, POST_STORIES, POST_STORIES_BY_ACTION_TYPE, POST_STORYTELLERS, POST_STORYTELLERS_BY_ACTION_TYPE, POST_VIDEO_AVG_TIME_WATCHED, POST_VIDEO_COMPLETE_VIEWS_ORGANIC, POST_VIDEO_COMPLETE_VIEWS_ORGANIC_UNIQUE, POST_VIDEO_COMPLETE_VIEWS_PAID, POST_VIDEO_COMPLETE_VIEWS_PAID_UNIQUE, POST_VIDEO_RETENTION_GRAPH, POST_VIDEO_RETENTION_GRAPH_AUTOPLAYED, POST_VIDEO_RETENTION_GRAPH_CLICKED_TO_PLAY, POST_VIDEO_VIEW_TIME_BY_AGE_BUCKET_AND_GENDER, POST_VIDEO_VIEW_TIME_BY_COUNTRY_ID, POST_VIDEO_VIEW_TIME_BY_DISTRIBUTION_TYPE, POST_VIDEO_VIEW_TIME_BY_REGION_ID, POST_VIDEO_VIEWS_BY_DISTRIBUTION_TYPE, POST_VIDEO_VIEWS_ORGANIC, POST_VIDEO_VIEWS_ORGANIC_UNIQUE, POST_VIDEO_VIEWS_PAID, POST_VIDEO_VIEWS_PAID_UNIQUE, POST_ACTIVITY_BY_ACTION_TYPE, POST_ACTIVITY_BY_ACTION_TYPE_UNIQUE, PAGE_ACTIONS_POST_REACTIONS_TOTAL, POST_REACTIONS_BY_TYPE_TOTAL, PAGE_ACTIONS_POST_REACTIONS_ANGER_TOTAL, PAGE_ACTIONS_POST_REACTIONS_HAHA_TOTAL, PAGE_ACTIONS_POST_REACTIONS_LIKE_TOTAL, PAGE_ACTIONS_POST_REACTIONS_LOVE_TOTAL, PAGE_ACTIONS_POST_REACTIONS_SORRY_TOTAL, PAGE_ACTIONS_POST_REACTIONS_WOW_TOTAL, POST_REACTIONS_LIKE_TOTAL, POST_REACTIONS_LOVE_TOTAL, POST_REACTIONS_WOW_TOTAL, POST_REACTIONS_HAHA_TOTAL, POST_REACTIONS_SORRY_TOTAL, POST_REACTIONS_ANGER_TOTAL, PAGE_FOLLOWS, PAGE_FOLLOWS_CITY, PAGE_FOLLOWS_COUNTRY, PAGE_MEDIA_VIEW, POST_MEDIA_VIEW. |
| Target | String | The default target for this insight. |
| FromDateTime | String | The earliest date and time value for which to return insight data. This will override the Periods input and in some insights is required. |
| ToDateTime | String | The latest date and time value for which to return insight data. This will override the Periods input and in some insights is required. |
| Description | String | An optional description for the insight. This will override the description that comes from the data source. |
| Name | Type | Description |
| Result | String | Returns Success or Failure. |
| SchemaFile | String | The generated schema file. You will need to set the Location connection property to the folder containing your schema files. |
| Columns | String | The number of columns found. |
You can query the system tables described in this section to access schema information, information on data source functionality, and batch operation statistics.
The following tables return database metadata for Facebook:
The following tables return information about how to connect to and query the data source:
The following table returns query statistics for data modification queries:
Lists the available databases.
The following query retrieves all databases determined by the connection string:
SELECT * FROM sys_catalogs
| Name | Type | Description |
| CatalogName | String | The database name. |
Lists the available schemas.
The following query retrieves all available schemas:
SELECT * FROM sys_schemas
| Name | Type | Description |
| CatalogName | String | The database name. |
| SchemaName | String | The schema name. |
Lists the available tables.
The following query retrieves the available tables and views:
SELECT * FROM sys_tables
| Name | Type | Description |
| CatalogName | String | The database containing the table or view. |
| SchemaName | String | The schema containing the table or view. |
| TableName | String | The name of the table or view. |
| TableType | String | The table type (table or view). |
| Description | String | A description of the table or view. |
| IsUpdateable | Boolean | Whether the table can be updated. |
Describes the columns of the available tables and views.
The following query returns the columns and data types for the Posts table:
SELECT ColumnName, DataTypeName FROM sys_tablecolumns WHERE TableName='Posts'
| Name | Type | Description |
| CatalogName | String | The name of the database containing the table or view. |
| SchemaName | String | The schema containing the table or view. |
| TableName | String | The name of the table or view containing the column. |
| ColumnName | String | The column name. |
| DataTypeName | String | The data type name. |
| DataType | Int32 | An integer indicating the data type. This value is determined at run time based on the environment. |
| Length | Int32 | The storage size of the column. |
| DisplaySize | Int32 | The designated column's normal maximum width in characters. |
| NumericPrecision | Int32 | The maximum number of digits in numeric data. The column length in characters for character and date-time data. |
| NumericScale | Int32 | The column scale or number of digits to the right of the decimal point. |
| IsNullable | Boolean | Whether the column can contain null. |
| Description | String | A brief description of the column. |
| Ordinal | Int32 | The sequence number of the column. |
| IsAutoIncrement | String | Whether the column value is assigned in fixed increments. |
| IsGeneratedColumn | String | Whether the column is generated. |
| IsHidden | Boolean | Whether the column is hidden. |
| IsArray | Boolean | Whether the column is an array. |
| IsReadOnly | Boolean | Whether the column is read-only. |
| IsKey | Boolean | Indicates whether a field returned from sys_tablecolumns is the primary key of the table. |
| ColumnType | String | The role or classification of the column in the schema. Possible values include SYSTEM, LINKEDCOLUMN, NAVIGATIONKEY, REFERENCECOLUMN, and NAVIGATIONPARENTCOLUMN. |
Lists the available stored procedures.
The following query retrieves the available stored procedures:
SELECT * FROM sys_procedures
| Name | Type | Description |
| CatalogName | String | The database containing the stored procedure. |
| SchemaName | String | The schema containing the stored procedure. |
| ProcedureName | String | The name of the stored procedure. |
| Description | String | A description of the stored procedure. |
| ProcedureType | String | The type of the procedure, such as PROCEDURE or FUNCTION. |
Describes stored procedure parameters.
The following query returns information about all of the input parameters for the GetOAuthAccessToken stored procedure:
SELECT * FROM sys_procedureparameters WHERE ProcedureName = 'GetOAuthAccessToken' AND Direction = 1 OR Direction = 2
To include result set columns in addition to the parameters, set the IncludeResultColumns pseudo column to True:
SELECT * FROM sys_procedureparameters WHERE ProcedureName = 'GetOAuthAccessToken' AND IncludeResultColumns='True'
| Name | Type | Description |
| CatalogName | String | The name of the database containing the stored procedure. |
| SchemaName | String | The name of the schema containing the stored procedure. |
| ProcedureName | String | The name of the stored procedure containing the parameter. |
| ColumnName | String | The name of the stored procedure parameter. |
| Direction | Int32 | An integer corresponding to the type of the parameter: input (1), input/output (2), or output(4). input/output type parameters can be both input and output parameters. |
| DataType | Int32 | An integer indicating the data type. This value is determined at run time based on the environment. |
| DataTypeName | String | The name of the data type. |
| NumericPrecision | Int32 | The maximum precision for numeric data. The column length in characters for character and date-time data. |
| Length | Int32 | The number of characters allowed for character data. The number of digits allowed for numeric data. |
| NumericScale | Int32 | The number of digits to the right of the decimal point in numeric data. |
| IsNullable | Boolean | Whether the parameter can contain null. |
| IsRequired | Boolean | Whether the parameter is required for execution of the procedure. |
| IsArray | Boolean | Whether the parameter is an array. |
| Description | String | The description of the parameter. |
| Ordinal | Int32 | The index of the parameter. |
| Values | String | The values you can set in this parameter are limited to those shown in this column. Possible values are comma-separated. |
| SupportsStreams | Boolean | Whether the parameter represents a file that you can pass as either a file path or a stream. |
| IsPath | Boolean | Whether the parameter is a target path for a schema creation operation. |
| Default | String | The value used for this parameter when no value is specified. |
| SpecificName | String | A label that, when multiple stored procedures have the same name, uniquely identifies each identically-named stored procedure. If there's only one procedure with a given name, its name is simply reflected here. |
| IsCDataProvided | Boolean | Whether the procedure is added/implemented by CData, as opposed to being a native Facebook procedure. |
| Name | Type | Description |
| IncludeResultColumns | Boolean | Whether the output should include columns from the result set in addition to parameters. Defaults to False. |
Describes the primary and foreign keys.
The following query retrieves the primary key for the Posts table:
SELECT * FROM sys_keycolumns WHERE IsKey='True' AND TableName='Posts'
| Name | Type | Description |
| CatalogName | String | The name of the database containing the key. |
| SchemaName | String | The name of the schema containing the key. |
| TableName | String | The name of the table containing the key. |
| ColumnName | String | The name of the key column. |
| IsKey | Boolean | Whether the column is a primary key in the table referenced in the TableName field. |
| IsForeignKey | Boolean | Whether the column is a foreign key referenced in the TableName field. |
| PrimaryKeyName | String | The name of the primary key. |
| ForeignKeyName | String | The name of the foreign key. |
| ReferencedCatalogName | String | The database containing the primary key. |
| ReferencedSchemaName | String | The schema containing the primary key. |
| ReferencedTableName | String | The table containing the primary key. |
| ReferencedColumnName | String | The column name of the primary key. |
Describes the foreign keys.
The following query retrieves all foreign keys which refer to other tables:
SELECT * FROM sys_foreignkeys WHERE ForeignKeyType = 'FOREIGNKEY_TYPE_IMPORT'
| Name | Type | Description |
| CatalogName | String | The name of the database containing the key. |
| SchemaName | String | The name of the schema containing the key. |
| TableName | String | The name of the table containing the key. |
| ColumnName | String | The name of the key column. |
| PrimaryKeyName | String | The name of the primary key. |
| ForeignKeyName | String | The name of the foreign key. |
| ReferencedCatalogName | String | The database containing the primary key. |
| ReferencedSchemaName | String | The schema containing the primary key. |
| ReferencedTableName | String | The table containing the primary key. |
| ReferencedColumnName | String | The column name of the primary key. |
| ForeignKeyType | String | Designates whether the foreign key is an import (points to other tables) or export (referenced from other tables) key. |
Describes the primary keys.
The following query retrieves the primary keys from all tables and views:
SELECT * FROM sys_primarykeys
| Name | Type | Description |
| CatalogName | String | The name of the database containing the key. |
| SchemaName | String | The name of the schema containing the key. |
| TableName | String | The name of the table containing the key. |
| ColumnName | String | The name of the key column. |
| KeySeq | String | The sequence number of the primary key. |
| KeyName | String | The name of the primary key. |
Describes the available indexes. By filtering on indexes, you can write more selective queries with faster query response times.
The following query retrieves all indexes that are not primary keys:
SELECT * FROM sys_indexes WHERE IsPrimary='false'
| Name | Type | Description |
| CatalogName | String | The name of the database containing the index. |
| SchemaName | String | The name of the schema containing the index. |
| TableName | String | The name of the table containing the index. |
| IndexName | String | The index name. |
| ColumnName | String | The name of the column associated with the index. |
| IsUnique | Boolean | True if the index is unique. False otherwise. |
| IsPrimary | Boolean | True if the index is a primary key. False otherwise. |
| Type | Int16 | An integer value corresponding to the index type: statistic (0), clustered (1), hashed (2), or other (3). |
| SortOrder | String | The sort order: A for ascending or D for descending. |
| OrdinalPosition | Int16 | The sequence number of the column in the index. |
Returns information on the available connection properties and those set in the connection string.
The following query retrieves all connection properties that have been set in the connection string or set through a default value:
SELECT * FROM sys_connection_props WHERE Value <> ''
| Name | Type | Description |
| Name | String | The name of the connection property. |
| ShortDescription | String | A brief description. |
| Type | String | The data type of the connection property. |
| Default | String | The default value if one is not explicitly set. |
| Values | String | A comma-separated list of possible values. A validation error is thrown if another value is specified. |
| Value | String | The value you set or a preconfigured default. |
| Required | Boolean | Whether the property is required to connect. |
| Category | String | The category of the connection property. |
| IsSessionProperty | String | Whether the property is a session property, used to save information about the current connection. |
| Sensitivity | String | The sensitivity level of the property. This informs whether the property is obfuscated in logging and authentication forms. |
| PropertyName | String | A camel-cased truncated form of the connection property name. |
| Ordinal | Int32 | The index of the parameter. |
| CatOrdinal | Int32 | The index of the parameter category. |
| Hierarchy | String | Shows dependent properties associated that need to be set alongside this one. |
| Visible | Boolean | Informs whether the property is visible in the connection UI. |
| ETC | String | Various miscellaneous information about the property. |
Describes the SELECT query processing that the Cloud can offload to the data source.
See SQL Compliance for SQL syntax details.
Below is an example data set of SQL capabilities. Some aspects of SELECT functionality are returned in a comma-separated list if supported; otherwise, the column contains NO.
| Name | Description | Possible Values |
| AGGREGATE_FUNCTIONS | Supported aggregation functions. | AVG, COUNT, MAX, MIN, SUM, DISTINCT |
| COUNT | Whether COUNT function is supported. | YES, NO |
| IDENTIFIER_QUOTE_OPEN_CHAR | The opening character used to escape an identifier. | [ |
| IDENTIFIER_QUOTE_CLOSE_CHAR | The closing character used to escape an identifier. | ] |
| SUPPORTED_OPERATORS | A list of supported SQL operators. | =, >, <, >=, <=, <>, !=, LIKE, NOT LIKE, IN, NOT IN, IS NULL, IS NOT NULL, AND, OR |
| GROUP_BY | Whether GROUP BY is supported, and, if so, the degree of support. | NO, NO_RELATION, EQUALS_SELECT, SQL_GB_COLLATE |
| OJ_CAPABILITIES | The supported varieties of outer joins supported. | NO, LEFT, RIGHT, FULL, INNER, NOT_ORDERED, ALL_COMPARISON_OPS |
| OUTER_JOINS | Whether outer joins are supported. | YES, NO |
| SUBQUERIES | Whether subqueries are supported, and, if so, the degree of support. | NO, COMPARISON, EXISTS, IN, CORRELATED_SUBQUERIES, QUANTIFIED |
| STRING_FUNCTIONS | Supported string functions. | LENGTH, CHAR, LOCATE, REPLACE, SUBSTRING, RTRIM, LTRIM, RIGHT, LEFT, UCASE, SPACE, SOUNDEX, LCASE, CONCAT, ASCII, REPEAT, OCTET, BIT, POSITION, INSERT, TRIM, UPPER, REGEXP, LOWER, DIFFERENCE, CHARACTER, SUBSTR, STR, REVERSE, PLAN, UUIDTOSTR, TRANSLATE, TRAILING, TO, STUFF, STRTOUUID, STRING, SPLIT, SORTKEY, SIMILAR, REPLICATE, PATINDEX, LPAD, LEN, LEADING, KEY, INSTR, INSERTSTR, HTML, GRAPHICAL, CONVERT, COLLATION, CHARINDEX, BYTE |
| NUMERIC_FUNCTIONS | Supported numeric functions. | ABS, ACOS, ASIN, ATAN, ATAN2, CEILING, COS, COT, EXP, FLOOR, LOG, MOD, SIGN, SIN, SQRT, TAN, PI, RAND, DEGREES, LOG10, POWER, RADIANS, ROUND, TRUNCATE |
| TIMEDATE_FUNCTIONS | Supported date/time functions. | NOW, CURDATE, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, MONTH, QUARTER, WEEK, YEAR, CURTIME, HOUR, MINUTE, SECOND, TIMESTAMPADD, TIMESTAMPDIFF, DAYNAME, MONTHNAME, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, EXTRACT |
| REPLICATION_SKIP_TABLES | Indicates tables skipped during replication. | |
| REPLICATION_TIMECHECK_COLUMNS | A string array containing a list of columns which will be used to check for (in the given order) to use as a modified column during replication. | |
| IDENTIFIER_PATTERN | String value indicating what string is valid for an identifier. | |
| SUPPORT_TRANSACTION | Indicates if the provider supports transactions such as commit and rollback. | YES, NO |
| DIALECT | Indicates the SQL dialect to use. | |
| KEY_PROPERTIES | Indicates the properties which identify the uniform database. | |
| SUPPORTS_MULTIPLE_SCHEMAS | Indicates if multiple schemas may exist for the provider. | YES, NO |
| SUPPORTS_MULTIPLE_CATALOGS | Indicates if multiple catalogs may exist for the provider. | YES, NO |
| DATASYNCVERSION | The CData Data Sync version needed to access this driver. | Standard, Starter, Professional, Enterprise |
| DATASYNCCATEGORY | The CData Data Sync category of this driver. | Source, Destination, Cloud Destination |
| SUPPORTSENHANCEDSQL | Whether enhanced SQL functionality beyond what is offered by the API is supported. | TRUE, FALSE |
| SUPPORTS_BATCH_OPERATIONS | Whether batch operations are supported. | YES, NO |
| SQL_CAP | All supported SQL capabilities for this driver. | SELECT, INSERT, DELETE, UPDATE, TRANSACTIONS, ORDERBY, OAUTH, ASSIGNEDID, LIMIT, LIKE, BULKINSERT, COUNT, BULKDELETE, BULKUPDATE, GROUPBY, HAVING, AGGS, OFFSET, REPLICATE, COUNTDISTINCT, JOINS, DROP, CREATE, DISTINCT, INNERJOINS, SUBQUERIES, ALTER, MULTIPLESCHEMAS, GROUPBYNORELATION, OUTERJOINS, UNIONALL, UNION, UPSERT, GETDELETED, CROSSJOINS, GROUPBYCOLLATE, MULTIPLECATS, FULLOUTERJOIN, MERGE, JSONEXTRACT, BULKUPSERT, SUM, SUBQUERIESFULL, MIN, MAX, JOINSFULL, XMLEXTRACT, AVG, MULTISTATEMENTS, FOREIGNKEYS, CASE, LEFTJOINS, COMMAJOINS, WITH, LITERALS, RENAME, NESTEDTABLES, EXECUTE, BATCH, BASIC, INDEX |
| PREFERRED_CACHE_OPTIONS | A string value specifies the preferred cacheOptions. | |
| ENABLE_EF_ADVANCED_QUERY | Indicates if the driver directly supports advanced queries coming from Entity Framework. If not, queries will be handled client side. | YES, NO |
| PSEUDO_COLUMNS | A string array indicating the available pseudo columns. | |
| MERGE_ALWAYS | If the value is true, The Merge Mode is forcibly executed in Data Sync. | TRUE, FALSE |
| REPLICATION_MIN_DATE_QUERY | A select query to return the replicate start datetime. | |
| REPLICATION_MIN_FUNCTION | Allows a provider to specify the formula name to use for executing a server side min. | |
| REPLICATION_START_DATE | Allows a provider to specify a replicate startdate. | |
| REPLICATION_MAX_DATE_QUERY | A select query to return the replicate end datetime. | |
| REPLICATION_MAX_FUNCTION | Allows a provider to specify the formula name to use for executing a server side max. | |
| IGNORE_INTERVALS_ON_INITIAL_REPLICATE | A list of tables which will skip dividing the replicate into chunks on the initial replicate. | |
| CHECKCACHE_USE_PARENTID | Indicates whether the CheckCache statement should be done against the parent key column. | TRUE, FALSE |
| CREATE_SCHEMA_PROCEDURES | Indicates stored procedures that can be used for generating schema files. |
The following query retrieves the operators that can be used in the WHERE clause:
SELECT * FROM sys_sqlinfo WHERE Name = 'SUPPORTED_OPERATORS'
Note that individual tables may have different limitations or requirements on the WHERE clause; refer to the Data Model section for more information.
| Name | Type | Description |
| NAME | String | A component of SQL syntax, or a capability that can be processed on the server. |
| VALUE | String | Detail on the supported SQL or SQL syntax. |
Returns information about attempted modifications.
The following query retrieves the Ids of the modified rows in a batch operation:
SELECT * FROM sys_identity
| Name | Type | Description |
| Id | String | The database-generated Id returned from a data modification operation. |
| Batch | String | An identifier for the batch. 1 for a single operation. |
| Operation | String | The result of the operation in the batch: INSERTED, UPDATED, or DELETED. |
| Message | String | SUCCESS or an error message if the update in the batch failed. |
Describes the available system information.
The following query retrieves all columns:
SELECT * FROM sys_information
| Name | Type | Description |
| Product | String | The name of the product. |
| Version | String | The version number of the product. |
| Datasource | String | The name of the datasource the product connects to. |
| NodeId | String | The unique identifier of the machine where the product is installed. |
| HelpURL | String | The URL to the product's help documentation. |
| License | String | The license information for the product. (If this information is not available, the field may be left blank or marked as 'N/A'.) |
| Location | String | The file path location where the product's library is stored. |
| Environment | String | The version of the environment or rumtine the product is currently running under. |
| DataSyncVersion | String | The tier of CData Sync required to use this connector. |
| DataSyncCategory | String | The category of CData Sync functionality (e.g., Source, Destination). |
The connection string properties are the various options that can be used to establish a connection. This section provides a complete list of the options you can configure in the connection string for this provider. Click the links for further details.
For more information on establishing a connection, see Establishing a Connection.
| Property | Description |
| AuthenticateAsPage | The Id of a page to authenticate as when making requests to Facebook. |
| Property | Description |
| OAuthClientId | Specifies the client ID (also known as the consumer key) assigned to your custom OAuth application. This ID is required to identify the application to the OAuth authorization server during authentication. |
| OAuthClientSecret | Specifies the client secret assigned to your custom OAuth application. This confidential value is used to authenticate the application to the OAuth authorization server. (Custom OAuth applications only.). |
| Scope | The scope to use when authenticating to Facebook. |
| Property | Description |
| SSLServerCert | Specifies the certificate to be accepted from the server when connecting using TLS/SSL. |
| Property | Description |
| Verbosity | Specifies the verbosity level of the log file, which controls the amount of detail logged. Supported values range from 1 to 5. |
| Property | Description |
| BrowsableSchemas | Optional setting that restricts the schemas reported to a subset of all available schemas. For example, BrowsableSchemas=SchemaA,SchemaB,SchemaC . |
| Property | Description |
| AggregateFormat | The format aggregate or collection columns should return in. |
| IgnorePermissionErrors | On reads of data from Facebook, ignore errors about missing permissions. |
| MaxRows | Specifies the maximum number of rows returned for queries that do not include either aggregation or GROUP BY. |
| Pagesize | The maximum number of results to return per page from Facebook. |
| PseudoColumns | Specifies the pseudocolumns to expose as table columns, expressed as a string in the format 'TableName=ColumnName;TableName=ColumnName'. |
| Target | A default target if none is specified. Used for some tables, such as Comments, where a target may be specified. |
| Timeout | Specifies the maximum time, in seconds, that the provider waits for a server response before throwing a timeout error. |
| UploadLinkedMedia | Upload linked photos or videos before inserting a new Post. |
This section provides a complete list of the Authentication properties you can configure in the connection string for this provider.
| Property | Description |
| AuthenticateAsPage | The Id of a page to authenticate as when making requests to Facebook. |
The Id of a page to authenticate as when making requests to Facebook.
string
""
The Id of a page to retrieve data from. The page must be managed by the authenticated user; you can obtain the Ids for all such pages by querying the Pages view.
This section provides a complete list of the OAuth properties you can configure in the connection string for this provider.
| Property | Description |
| OAuthClientId | Specifies the client ID (also known as the consumer key) assigned to your custom OAuth application. This ID is required to identify the application to the OAuth authorization server during authentication. |
| OAuthClientSecret | Specifies the client secret assigned to your custom OAuth application. This confidential value is used to authenticate the application to the OAuth authorization server. (Custom OAuth applications only.). |
| Scope | The scope to use when authenticating to Facebook. |
Specifies the client ID (also known as the consumer key) assigned to your custom OAuth application. This ID is required to identify the application to the OAuth authorization server during authentication.
string
""
This property is required in two cases:
(When the driver provides embedded OAuth credentials, this value may already be provided by the Cloud and thus not require manual entry.)
OAuthClientId is generally used alongside other OAuth-related properties such as OAuthClientSecret and OAuthSettingsLocation when configuring an authenticated connection.
OAuthClientId is one of the key connection parameters that need to be set before users can authenticate via OAuth. You can usually find this value in your identity provider’s application registration settings. Look for a field labeled Client ID, Application ID, or Consumer Key.
While the client ID is not considered a confidential value like a client secret, it is still part of your application's identity and should be handled carefully. Avoid exposing it in public repositories or shared configuration files.
For more information on how this property is used when configuring a connection, see Establishing a Connection.
Specifies the client secret assigned to your custom OAuth application. This confidential value is used to authenticate the application to the OAuth authorization server. (Custom OAuth applications only.).
string
""
This property (sometimes called the application secret or consumer secret) is required when using a custom OAuth application in any flow that requires secure client authentication, such as web-based OAuth, service-based connections, or certificate-based authorization flows. It is not required when using an embedded OAuth application.
The client secret is used during the token exchange step of the OAuth flow, when the driver requests an access token from the authorization server. If this value is missing or incorrect, authentication fails with either an invalid_client or an unauthorized_client error.
OAuthClientSecret is one of the key connection parameters that need to be set before users can authenticate via OAuth. You can obtain this value from your identity provider when registering the OAuth application.
Notes:
For more information on how this property is used when configuring a connection, see Establishing a Connection
The scope to use when authenticating to Facebook.
string
""
The scope that are used when authenticating to Facebook give your App access to request additional information that may be required for certain tables. Individual scope may be entered in a comma separated list. Leaving it blank will use the defaults. The Scope is only used if you have specified your own OAuthClientId and OAuthClientSecret.
You may find while using the Cloud that Facebook returns an error stating your app does not have permissions to do a certain action. To resolve this, you will need to generate a new OAuth access token with the required scope. Set the Scope property in the authentication step. You can find a list of available Facebook scopes here: http://developers.facebook.com/docs/authentication/permissions/. Permissions that may be required depending on your use case are:
user_birthday, user_photos, user_videos, user_likes, user_hometown, user_location, read_insights, pages_manage_metadata, pages_read_engagement, pages_read_user_content, pages_messaging, business_management, instagram_basic, instagram_manage_insights
This section provides a complete list of the SSL properties you can configure in the connection string for this provider.
| Property | Description |
| SSLServerCert | Specifies the certificate to be accepted from the server when connecting using TLS/SSL. |
Specifies the certificate to be accepted from the server when connecting using TLS/SSL.
string
""
If you are using a TLS/SSL connection, use this property to specify the TLS/SSL certificate to be accepted from the server. If you specify a value for this property, all other certificates that are not trusted by the machine are rejected.
This property can take the following forms:
| Description | Example |
| A full PEM Certificate (example shortened for brevity) | -----BEGIN CERTIFICATE----- MIIChTCCAe4CAQAwDQYJKoZIhv......Qw== -----END CERTIFICATE----- |
| A path to a local file containing the certificate | C:\cert.cer |
| The public key (example shortened for brevity) | -----BEGIN RSA PUBLIC KEY----- MIGfMA0GCSq......AQAB -----END RSA PUBLIC KEY----- |
| The MD5 Thumbprint (hex values can also be either space- or colon-separated) | ecadbdda5a1529c58a1e9e09828d70e4 |
| The SHA1 Thumbprint (hex values can also be either space- or colon-separated) | 34a929226ae0819f2ec14b4a3d904f801cbb150d |
Note: It is possible to use '*' to signify that all certificates should be accepted, but due to security concerns this is not recommended.
This section provides a complete list of the Logging properties you can configure in the connection string for this provider.
| Property | Description |
| Verbosity | Specifies the verbosity level of the log file, which controls the amount of detail logged. Supported values range from 1 to 5. |
Specifies the verbosity level of the log file, which controls the amount of detail logged. Supported values range from 1 to 5.
string
"1"
This property defines the level of detail the Cloud includes in the log file. Higher verbosity levels increase the detail of the logged information, but may also result in larger log files and slower performance due to the additional data being captured.
The default verbosity level is 1, which is recommended for regular operation. Higher verbosity levels are primarily intended for debugging purposes. For more information on each level, refer to Logging.
When combined with the LogModules property, Verbosity can refine logging to specific categories of information.
This section provides a complete list of the Schema properties you can configure in the connection string for this provider.
| Property | Description |
| BrowsableSchemas | Optional setting that restricts the schemas reported to a subset of all available schemas. For example, BrowsableSchemas=SchemaA,SchemaB,SchemaC . |
Optional setting that restricts the schemas reported to a subset of all available schemas. For example, BrowsableSchemas=SchemaA,SchemaB,SchemaC .
string
""
Listing all available database schemas can take extra time, thus degrading performance. Providing a list of schemas in the connection string saves time and improves performance.
This section provides a complete list of the Miscellaneous properties you can configure in the connection string for this provider.
| Property | Description |
| AggregateFormat | The format aggregate or collection columns should return in. |
| IgnorePermissionErrors | On reads of data from Facebook, ignore errors about missing permissions. |
| MaxRows | Specifies the maximum number of rows returned for queries that do not include either aggregation or GROUP BY. |
| Pagesize | The maximum number of results to return per page from Facebook. |
| PseudoColumns | Specifies the pseudocolumns to expose as table columns, expressed as a string in the format 'TableName=ColumnName;TableName=ColumnName'. |
| Target | A default target if none is specified. Used for some tables, such as Comments, where a target may be specified. |
| Timeout | Specifies the maximum time, in seconds, that the provider waits for a server response before throwing a timeout error. |
| UploadLinkedMedia | Upload linked photos or videos before inserting a new Post. |
The format aggregate or collection columns should return in.
string
"JSON"
The format aggregate or collection columns should return in.
On reads of data from Facebook, ignore errors about missing permissions.
bool
false
This property is disabled by default. While it may help temporarily avoid issues with workflows, permanent resolution of permssions errors is encouraged.
Specifies the maximum number of rows returned for queries that do not include either aggregation or GROUP BY.
int
-1
The default value for this property, -1, means that no row limit is enforced unless the query explicitly includes a LIMIT clause. (When a query includes a LIMIT clause, the value specified in the query takes precedence over the MaxRows setting.)
Setting MaxRows to a whole number greater than 0 ensures that queries do not return excessively large result sets by default.
This property is useful for optimizing performance and preventing excessive resource consumption when executing queries that could otherwise return very large datasets.
The maximum number of results to return per page from Facebook.
string
""
The Pagesize property affects the maximum number of results to return per page from Facebook. Sometimes you may get an error asking you to request less data. The frequency of such errors can be reduced by reducing the pagesize. The maximum pagesize tends to be about 100 per page.
Specifies the pseudocolumns to expose as table columns, expressed as a string in the format 'TableName=ColumnName;TableName=ColumnName'.
string
""
This property allows you to define which pseudocolumns the Cloud exposes as table columns.
To specify individual pseudocolumns, use the following format:
Table1=Column1;Table1=Column2;Table2=Column3
To include all pseudocolumns for all tables use:
*=*
A default target if none is specified. Used for some tables, such as Comments, where a target may be specified.
string
""
A default target if none is specified. Used for some tables, such as Comments, where a target may be specified.
Specifies the maximum time, in seconds, that the provider waits for a server response before throwing a timeout error.
int
60
The timeout applies to each individual communication with the server rather than the entire query or operation. For example, a query could continue running beyond 60 seconds if each paging call completes within the timeout limit.
Timeout is set to 60 seconds by default. To disable timeouts, set this property to 0.
Disabling the timeout allows operations to run indefinitely until they succeed or fail due to other conditions such as server-side timeouts, network interruptions, or resource limits on the server.
Note: Use this property cautiously to avoid long-running operations that could degrade performance or result in unresponsive behavior.
Upload linked photos or videos before inserting a new Post.
bool
false
The UploadLinkedMedia determines whether to upload media before inserting a Post. If set to True, when you attempt to insert a new Post with the Link column, the driver will first attempt to resolve the URL and determine if the URL is referencing a photo or a video. If so, the photo or video will be uploaded first, then a new Post containing the media will be created. If False, then the new Post will be created as a Link Post.
LZMA from 7Zip LZMA SDK
LZMA SDK is placed in the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or distribute the original LZMA SDK code, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.
LZMA2 from XZ SDK
Version 1.9 and older are in the public domain.
Xamarin.Forms
Xamarin SDK
The MIT License (MIT)
Copyright (c) .NET Foundation Contributors
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
NSIS 3.10
Copyright (C) 1999-2025 Contributors THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
1. DEFINITIONS
"Contribution" means:
a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and b) in the case of each subsequent Contributor:
i) changes to the Program, and
ii) additions to the Program;
where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
"Contributor" means any person or entity that distributes the Program.
"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
"Program" means the Contributions distributed in accordance with this Agreement.
"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
2. GRANT OF RIGHTS
a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
3. REQUIREMENTS
A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
a) it complies with the terms and conditions of this Agreement; and
b) its license agreement:
i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
When the Program is made available in source code form:
a) it must be made available under this Agreement; and
b) a copy of this Agreement must be included with each copy of the Program.
Contributors may not remove or alter any copyright notices contained within the Program.
Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
4. COMMERCIAL DISTRIBUTION
Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
5. NO WARRANTY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
6. DISCLAIMER OF LIABILITY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
7. GENERAL
If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. IBM is the initial Agreement Steward. IBM may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.