{"id":320,"date":"2016-01-11T15:41:54","date_gmt":"2016-01-11T15:41:54","guid":{"rendered":"http:\/\/zappysys.com\/blog\/?p=320"},"modified":"2025-04-07T12:57:41","modified_gmt":"2025-04-07T12:57:41","slug":"get-data-from-facebook-in-ssis-using-rest-api","status":"publish","type":"post","link":"https:\/\/zappysys.com\/blog\/get-data-from-facebook-in-ssis-using-rest-api\/","title":{"rendered":"How to get data from Facebook in SSIS using REST API"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p><a href=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/01\/facebook-api-integration.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1667 alignleft\" src=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/01\/facebook-api-integration.png\" alt=\"\" width=\"123\" height=\"123\" \/><\/a>In this article you will learn how to get data from Facebook using Graph API (OAuth 2.0) using <a href=\"\/\/zappysys.com\/products\/ssis-powerpack\/\" target=\"_blank\" rel=\"noopener\">SSIS PowerPack<\/a> REST api Connectors. Facebook provides rich set of REST API to access data. Their REST API is also known as <strong>Facebook Graph API<\/strong> and it uses <strong>OAuth 2.0<\/strong> Authorization.\u00a0Traditionally any REST API Integration scenarios in <strong>SSIS<\/strong> requires you to use some sort of SDKs\u00a0using\u00a0popular programming languages (e.g. C#, Java, Ruby, Python). If you are DBA or SSIS Developer and you prefer to use clean drag and drop approach rather complex programming then this article will show you how to achieve it.<\/p>\n<p><a href=\"\/\/zappysys.com\/products\/ssis-powerpack\/\" target=\"_blank\" rel=\"noopener\">SSIS PowerPack<\/a> REST API Connectors can be used to consume\/manage Facebook data using REST API. Following connectors will be used in this article.<\/p>\n<div class=\"su-table su-table-alternate\">\n<table>\n<tbody>\n<tr>\n<td width=\"36\"><img decoding=\"async\" src=\"\/\/zappysys.com\/images\/ssis-powerpack\/ssis-rest-api-web-service-task.png\" alt=\"Custom SSIS Tasks - Call REST API Webservice (GET, POST, DELETE etc)\" width=\"32\" \/><\/td>\n<td><u><a href=\"\/\/zappysys.com\/products\/ssis-powerpack\/ssis-rest-api-web-service-task\/\" target=\"_blank\" rel=\"noopener\">REST API Task<\/a><\/u><\/td>\n<\/tr>\n<tr>\n<td width=\"36\"><img decoding=\"async\" src=\"\/\/zappysys.com\/onlinehelp\/ssis-powerpack\/scr\/images\/oauth-connection\/ssis-oauth-connection-manager.png\" alt=\"SSIS OAuth Connection Manager\" width=\"32\" \/><\/td>\n<td><a href=\"\/\/zappysys.com\/onlinehelp\/ssis-powerpack\/scr\/ssis-oauth-connection-manager.htm\" target=\"_blank\" rel=\"noopener\">OAuth Connection Manager<\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"36\"><img decoding=\"async\" src=\"\/\/zappysys.com\/images\/SSIS-PowerPack\/SSIS-Json-Source-Adapter.png\" alt=\"Custom SSIS Components - JSON Source (File, REST, OData)\" width=\"32\" \/><\/td>\n<td><a href=\"\/\/zappysys.com\/products\/ssis-powerpack\/ssis-json-file-source\/\" target=\"_blank\" rel=\"noopener\">JSON Source (File, REST, OData)<\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2>Register Facebook OAuth App for Graph API access<\/h2>\n<p>Very first step to access Facebook API is register your custom OAuth App under Facebook developer portal. <a href=\"\/\/zappysys.com\/blog\/register-facebook-oauth-app-graph-api\/\" target=\"_blank\" rel=\"noopener\">Check this article for more information on this topic<\/a>.<\/p>\n<h2>Consume data from Facebook\u00a0using REST API in SSIS<\/h2>\n<p>In this section we will guide you how to create OAuth connection and consume data from Facebook in few clicks using <a href=\"\/\/zappysys.com\/products\/ssis-powerpack\/ssis-json-file-source\/\" target=\"_blank\" rel=\"noopener\">JSON Source (File, REST, OData)<\/a>\u00a0. We will load Facebook data into SQL Server.<\/p>\n<h3>Find Facebook PageID from its Name<\/h3>\n<p>In our case for example we want to Extract Page Insights for some page (e.g. facebook.com\/MyPage ). To findout pageid perform following steps<\/p>\n<ol>\n<li>Navigate to <a href=\"https:\/\/developers.facebook.com\/tools\/explorer\" target=\"_blank\" rel=\"noopener\">https:\/\/developers.facebook.com\/tools\/explorer<\/a><\/li>\n<li>Click Get Token button, select permission you really care (To get PageID you don&#8217;t need to check anything).<\/li>\n<li>Type \/YourPageName in the API Url bar<\/li>\n<li>Now click Submit. You will see response json which will have pagename and pageID\n<div id=\"attachment_603\" style=\"width: 610px\" class=\"wp-caption alignnone\"><a href=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/01\/using-facebook-graph-api-explorer-ssis-get-page-id.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-603\" class=\"wp-image-603\" src=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/01\/using-facebook-graph-api-explorer-ssis-get-page-id.png\" alt=\"Using Facebook Graph API Explorer, Test API, Find Object ID \/ PageID from Name\" width=\"600\" height=\"231\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/01\/using-facebook-graph-api-explorer-ssis-get-page-id.png 709w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/01\/using-facebook-graph-api-explorer-ssis-get-page-id-300x116.png 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/a><p id=\"caption-attachment-603\" class=\"wp-caption-text\">Using Facebook Graph API Explorer, Test API, Find Object ID \/ PageID from Name<\/p><\/div><\/li>\n<\/ol>\n<h3>Create Facebook OAuth Connection<\/h3>\n<p>You can create SSIS OAuth connection manager two ways. 1) From Add Connection manager option from designer or Click Add ZS-OAuth from Component UI. Lets use first method.<\/p>\n<ol>\n<li>In the SSIS Designer in connection manager pane .. right click and new connection &#8230; select ZS-OAUTH Connection from list<\/li>\n<li>Select Facebook provider from dropdown<\/li>\n<li>Select Custom OAuth App option<\/li>\n<li>Enter Facebook OAuth App ID and OAuth App Secret<\/li>\n<li>Select Permission (i.e. Scope) or type by hand (1 per each line)<\/li>\n<li>Click generate Token. You will be redirected to login page and then it will show Authorize App confirmation. Click Accept.<\/li>\n<li>Test Connection (If things go well it will show green success)\n<div id=\"attachment_588\" style=\"width: 610px\" class=\"wp-caption alignnone\"><a href=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/06\/ssis-facebook-test-oauth-connection-graph-api.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-588\" class=\"wp-image-588\" src=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/06\/ssis-facebook-test-oauth-connection-graph-api.png\" alt=\"Testing Facebook OAuth Connectivity in SSIS (Use Graph API)\" width=\"600\" height=\"384\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/06\/ssis-facebook-test-oauth-connection-graph-api.png 957w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/06\/ssis-facebook-test-oauth-connection-graph-api-300x192.png 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/a><p id=\"caption-attachment-588\" class=\"wp-caption-text\">Testing Facebook OAuth Connectivity in SSIS (Use Graph API)<\/p><\/div><\/li>\n<\/ol>\n<h3>Get Page Access Token (optional)<\/h3>\n<p>Accessing data of your Facebook page requires to generate a <em>Page Access Token<\/em>, follow the steps below to get it.\u00a0If you are using non-page API methods, then you can freely skip this step. In SSIS Designer drag and drop REST API Task.<\/p>\n<ol>\n<li>Then use the same OAuth connection we created in the previous step.<\/li>\n<li>Proceed with setting the URL using this format:<br \/>\n<code>https:\/\/graph.facebook.com\/v2.5\/<strong>REPLACE_WITH_PAGE_ID<\/strong>?fields=access_token<\/code><\/li>\n<li>Click <strong>Test Request\/Response<\/strong> button and then copy the <strong>Page Access Token<\/strong> to a Notepad.<\/li>\n<\/ol>\n<div id=\"attachment_8730\" style=\"width: 825px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/01\/001-get-data-from-facebook-in-ssis-using-rest-api-getting-page-access-token.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-8730\" class=\"wp-image-8730 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/01\/001-get-data-from-facebook-in-ssis-using-rest-api-getting-page-access-token.png\" alt=\"Getting Facebook Page Access Token using Facebook Graph API and SSIS\" width=\"815\" height=\"752\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/01\/001-get-data-from-facebook-in-ssis-using-rest-api-getting-page-access-token.png 815w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/01\/001-get-data-from-facebook-in-ssis-using-rest-api-getting-page-access-token-300x277.png 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/01\/001-get-data-from-facebook-in-ssis-using-rest-api-getting-page-access-token-768x709.png 768w\" sizes=\"(max-width: 815px) 100vw, 815px\" \/><\/a><p id=\"caption-attachment-8730\" class=\"wp-caption-text\">Getting Facebook Page Access Token using Facebook Graph API and SSIS<\/p><\/div>\n<h3>Get Long-Lived Access Token<\/h3>\n<p>Most likely, once finished, you will deploy the SSIS package to your SQL Server and then set a schedule to run it daily or hourly. With ordinary Access Tokens you will run into a problem after 30 or 60 days because these tokens will expire after a similar time and your SQL Job will fail. To avoid that, we can generate a Long-Lived Access Token which will live for 60 days, as long as you use that token (and running the package <em>is<\/em> using it). Perform these steps to generate a Long-Lived Access Token:<\/p>\n<ol>\n<li>Firstly, you will need to find out your Facebook User ID. To do that, call this URL in Facebook Graph Explorer or using REST API Task with configured OAuth Connection Manager:<br \/>\n<code>https:\/\/graph.facebook.com\/v2.5\/me<\/code><\/li>\n<li>Copy the ID from the response.<\/li>\n<li>Then drag and drop another REST API Task and configure it like this, if you want to generate a Long-Lived <span style=\"text-decoration: underline;\"><em>Page<\/em><\/span> Access Token:\n<div id=\"attachment_8731\" style=\"width: 800px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/01\/002-get-data-from-facebook-in-ssis-using-rest-api-getting-long-lived-page-access-token.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-8731\" class=\"wp-image-8731 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/01\/002-get-data-from-facebook-in-ssis-using-rest-api-getting-long-lived-page-access-token.png\" alt=\"Getting Facebook Long-Lived Page Access Token using Facebook Graph API and SSIS\" width=\"790\" height=\"709\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/01\/002-get-data-from-facebook-in-ssis-using-rest-api-getting-long-lived-page-access-token.png 790w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/01\/002-get-data-from-facebook-in-ssis-using-rest-api-getting-long-lived-page-access-token-300x269.png 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/01\/002-get-data-from-facebook-in-ssis-using-rest-api-getting-long-lived-page-access-token-768x689.png 768w\" sizes=\"(max-width: 790px) 100vw, 790px\" \/><\/a><p id=\"caption-attachment-8731\" class=\"wp-caption-text\">Getting Facebook Long-Lived Page Access Token using Facebook Graph API and SSIS<\/p><\/div>\n<p>Otherwise, if you want to generate a <em><span style=\"text-decoration: underline;\">non-page<\/span><\/em> Long-Lived Access Token, use this configuration:<\/p>\n<div id=\"attachment_8732\" style=\"width: 696px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/01\/003-get-data-from-facebook-in-ssis-using-rest-api-getting-long-lived-access-token.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-8732\" class=\"wp-image-8732 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/01\/003-get-data-from-facebook-in-ssis-using-rest-api-getting-long-lived-access-token.png\" alt=\"Getting Facebook Long-Lived Access Token using Facebook Graph API and SSIS\" width=\"686\" height=\"356\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/01\/003-get-data-from-facebook-in-ssis-using-rest-api-getting-long-lived-access-token.png 686w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/01\/003-get-data-from-facebook-in-ssis-using-rest-api-getting-long-lived-access-token-300x156.png 300w\" sizes=\"(max-width: 686px) 100vw, 686px\" \/><\/a><p id=\"caption-attachment-8732\" class=\"wp-caption-text\">Getting Facebook Long-Lived Access Token using Facebook Graph API and SSIS<\/p><\/div><\/li>\n<\/ol>\n<h3>Use JSON\/REST API Source to read from Graph API<\/h3>\n<p>Once you have OAuth connection manager. You can perform following steps to Extract data from Graph API Url. Facebook Graph API uses ObjectID in the URL so make sure you have that handy for whatever resource you want to access.<\/p>\n<h3>Configure JSON\/REST API\u00a0Source<\/h3>\n<p>Once you know pageid we can build our API URL. Lets assume your pageid is 12345678 and you want to extract page insight data via API call. In that case you may build your URL following way. You can change v2.5 to something else depending on API version you wish to use. If you omit version number from URL then default version will be used by Facebook API (Default API version can be found on Dashboard of your OAuth App).<\/p>\n<pre class=\"lang:default highlight:0 decode:true\">https:\/\/graph.facebook.com\/v2.5\/<strong>YOUR_PAGE_ID<\/strong>\/insights\/page_impressions_organic_unique<\/pre>\n<p>Now perform the following steps to configure JSON Source to extract data from Facebook API.<\/p>\n<p><strong>NOTE:<\/strong> Below steps assume that you already Downloaded and Installed\u00a0<a href=\"\/\/zappysys.com\/products\/ssis-powerpack\/\" target=\"_blank\" rel=\"noopener\">SSIS PowerPack<\/a><\/p>\n<ol>\n<li>Drag Data Flow Task from SSIS Toolbox and double click to view Dataflow designer<\/li>\n<li>Drag <strong>ZS JSON Source<\/strong> from SSIS Toolbox. Double click to\u00a0configure.<\/li>\n<li>In the AccessMode select &#8220;File Path or Web URL&#8221;<\/li>\n<li>Enter URL:<br \/>\n<code>https:\/\/graph.facebook.com\/v2.5\/<strong>YOUR_PAGE_ID<\/strong>\/insights\/page_impressions_organic_unique?access_token=<strong>REPLACE_WITH_LONG_LIVED_ACCESS_TOKEN<\/strong><\/code><br \/>\n<strong>NOTE:<\/strong> <a href=\"https:\/\/zappysys.com\/blog\/get-api-data-with-dynamic-url-and-load-into-sql-server\/\" target=\"_blank\" rel=\"noopener\">You may use variables and parameters in the URL<\/a> e.g. http:\/\/mydomain\/{{User::MyPath}}:<\/p>\n<div id=\"attachment_8733\" style=\"width: 698px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/01\/004-get-data-from-facebook-in-ssis-using-rest-api-getting-page-data.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-8733\" class=\"wp-image-8733 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/01\/004-get-data-from-facebook-in-ssis-using-rest-api-getting-page-data.png\" alt=\"Getting Facebook Page data using Facebook Graph API and SSIS\" width=\"688\" height=\"680\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/01\/004-get-data-from-facebook-in-ssis-using-rest-api-getting-page-data.png 688w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/01\/004-get-data-from-facebook-in-ssis-using-rest-api-getting-page-data-300x297.png 300w\" sizes=\"(max-width: 688px) 100vw, 688px\" \/><\/a><p id=\"caption-attachment-8733\" class=\"wp-caption-text\">Getting Facebook Page data using Facebook Graph API and SSIS<\/p><\/div><\/li>\n<li>Click on Select Filter and\u00a0select values node and click OK. It may produce filter expression like below.<\/li>\n<li>You can set <strong>Max Rows<\/strong> option to desired value if you don&#8217;t want to extract all rows (0=Unlimited)<\/li>\n<li>Goto Paging Tab and enter <strong>$.paging.next<\/strong> in the &#8220;Next Cursor&#8221; field as below\n<div id=\"attachment_8734\" style=\"width: 646px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/01\/005-get-data-from-facebook-in-ssis-using-rest-api-paging-through-the-results.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-8734\" class=\"wp-image-8734 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/01\/005-get-data-from-facebook-in-ssis-using-rest-api-paging-through-the-results.png\" alt=\"Getting page data from Facebook and paginating through the results using SSIS\" width=\"636\" height=\"449\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/01\/005-get-data-from-facebook-in-ssis-using-rest-api-paging-through-the-results.png 636w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/01\/005-get-data-from-facebook-in-ssis-using-rest-api-paging-through-the-results-300x212.png 300w\" sizes=\"(max-width: 636px) 100vw, 636px\" \/><\/a><p id=\"caption-attachment-8734\" class=\"wp-caption-text\">Getting page data from Facebook and paginating through the results using SSIS<\/p><\/div><\/li>\n<li>Click on Columns tab if you wish to see\/change metadata (You can change size \/ datatype there and Lock metadata to prevent auto refresh)<\/li>\n<li>Now click Preview to see sample data and then exit preview and click OK to save UI changes<\/li>\n<\/ol>\n<h3>Load Facebook data into SQL Server<\/h3>\n<p>If you wish to save Facebook data into SQL Server or any other target like Oracle, MySQL, FlatFile, Excel, etc., then you can use some native SSIS Connectors (e.g. OLEDB Destination, ADO.net Destination). Connect JSON Source to Destination and map source columns to target.<\/p>\n<h2>Facebook API Paging through dataset\u00a0(i.e. Loop, Cursor)<\/h2>\n<p>In the previous section, you saw how to adjust few attributes so JSON Source can paginate through Facebook API response. To\u00a0learn more about <a href=\"\/\/zappysys.com\/blog\/ssis-rest-api-looping-until-no-more-pages-found\/\" target=\"_blank\" rel=\"noopener\">REST API Paging Methods &#8211; Click this link<\/a><\/p>\n<p>Here is <a href=\"https:\/\/developers.facebook.com\/docs\/graph-api\/using-graph-api#paging\" target=\"_blank\" rel=\"noopener\">another link<\/a> from Facebook Documentation for Paging<\/p>\n<h2>Manage\/Write\/Update Facebook data using REST API<\/h2>\n<p>If you wish to create new POST\u00a0\u00a0or manage data using REST API then you most likely need to use <a href=\"\/\/zappysys.com\/products\/ssis-powerpack\/ssis-rest-api-web-service-task\/\" target=\"_blank\" rel=\"noopener\">REST API Task<\/a>\u00a0rather than JSON Source. REST API Task also supports uploading media files.<\/p>\n<p>&nbsp;<\/p>\n<h2>Deployment to Production<\/h2>\n<div class=\"content_block\" id=\"custom_post_widget-1932\"><p style=\"text-align: justify;\">In SSIS package <a href=\"https:\/\/docs.microsoft.com\/en-us\/sql\/integration-services\/security\/access-control-for-sensitive-data-in-packages\" target=\"_blank\" rel=\"noopener\">sensitive data such as tokens and passwords are by default encrypted by SSIS<\/a> with your Windows account which you use to create a package.\u00a0So SSIS will fail to decrypt tokens\/passwords when you run it from another machine using another Windows account. To circumvent this when you are creating an SSIS package which uses authentication components (e.g. an <a href=\"https:\/\/zappysys.com\/onlinehelp\/ssis-powerpack\/scr\/ssis-oauth-connection-manager.htm\" target=\"_blank\" rel=\"noopener\">OAuth Connection Manager<\/a>\u00a0or an <a href=\"https:\/\/zappysys.com\/onlinehelp\/ssis-powerpack\/scr\/ssis-http-connection-manager.htm\" target=\"_blank\" rel=\"noopener\">HTTP Connection Manager<\/a> with credentials, etc.), consider using parameters\/variables to pass tokens\/passwords. In this way, you won\u2019t face authentication related errors when a package is deployed to a production server.<\/p>\r\n<p style=\"text-align: justify;\">Check our article on <a href=\"https:\/\/zappysys.com\/blog\/how-to-run-an-ssis-package-with-sensitive-data-on-sql-server\/\" target=\"_blank\" rel=\"noopener\">how to configure packages with sensitive data on your production or development server<\/a>.<\/p><\/div>\n<p>You may also check the article on <a href=\"https:\/\/zappysys.com\/blog\/get-api-data-with-dynamic-url-and-load-into-sql-server\/\" target=\"_blank\" rel=\"noopener\">how to make URL dynamic\/parametric<\/a>, so that you can pass Long-Lived Access Token as an argument in a SQL Job.<\/p>\n<h2>Conclusion<\/h2>\n<p>Facebook data integration can be quite challenging without right set of tools. <a href=\"\/\/zappysys.com\/products\/ssis-powerpack\/\" target=\"_blank\" rel=\"noopener\">SSIS PowerPack<\/a>\u00a0provides complete toolset for any REST API integration related scenarios. Try it yourself and find out all hidden features not discussed in this article.<\/p>\n<h2>References<\/h2>\n<p><a href=\"https:\/\/developers.facebook.com\/docs\/graph-api\" target=\"_blank\" rel=\"noopener\">Facebook Graph REST API reference link<\/a><\/p>\n<p><a href=\"https:\/\/developers.facebook.com\/tools\/explorer\" target=\"_blank\" rel=\"noopener\">https:\/\/developers.facebook.com\/tools\/explorer<\/a><\/p>\n<p><a href=\"https:\/\/developers.facebook.com\/docs\/facebook-login\/access-tokens\/refreshing\/\" target=\"_blank\" rel=\"noopener\">https:\/\/developers.facebook.com\/docs\/facebook-login\/access-tokens\/refreshing\/<\/a><\/p>\n<h2>Similar articles<\/h2>\n<p><a title=\"Permalink to Read Twitter data in SSIS using REST API Task and JSON Source \u2013 OAuth2 Protocol\" href=\"\/\/zappysys.com\/blog\/read-twitter-data-in-ssis-using-rest-api-task-json-source-oauth2\/\" rel=\"bookmark\">Read Twitter data in SSIS using REST API Task and JSON Source \u2013 OAuth2 Protocol<\/a><\/p>\n<p><a title=\"Permalink to How to get data from Google AdWords using SSIS\" href=\"\/\/zappysys.com\/blog\/get-data-from-google-adwords-using-ssis\/\" rel=\"bookmark\">How to get data from Google AdWords using SSIS<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction In this article you will learn how to get data from Facebook using Graph API (OAuth 2.0) using SSIS PowerPack REST api Connectors. Facebook provides rich set of REST API to access data. Their REST API is also known as Facebook Graph API and it uses OAuth 2.0 Authorization.\u00a0Traditionally any REST API Integration scenarios [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1667,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[225,17],"tags":[215,110,70,6,27,3,12,4,7],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\r\n<title>How to get data from Facebook in SSIS using REST API | ZappySys Blog<\/title>\r\n<meta name=\"description\" content=\"Learn how to get data from Facebook in SSIS using REST API Calls. Easy to use drag and drop approach without coding will make your integration super easy\" \/>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/zappysys.com\/blog\/get-data-from-facebook-in-ssis-using-rest-api\/\" \/>\r\n<meta property=\"og:locale\" content=\"en_US\" \/>\r\n<meta property=\"og:type\" content=\"article\" \/>\r\n<meta property=\"og:title\" content=\"How to get data from Facebook in SSIS using REST API | ZappySys Blog\" \/>\r\n<meta property=\"og:description\" content=\"Learn how to get data from Facebook in SSIS using REST API Calls. Easy to use drag and drop approach without coding will make your integration super easy\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/zappysys.com\/blog\/get-data-from-facebook-in-ssis-using-rest-api\/\" \/>\r\n<meta property=\"og:site_name\" content=\"ZappySys Blog\" \/>\r\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/ZappySys\/\" \/>\r\n<meta property=\"article:published_time\" content=\"2016-01-11T15:41:54+00:00\" \/>\r\n<meta property=\"article:modified_time\" content=\"2025-04-07T12:57:41+00:00\" \/>\r\n<meta property=\"og:image\" content=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/01\/facebook-api-integration.png\" \/>\r\n\t<meta property=\"og:image:width\" content=\"123\" \/>\r\n\t<meta property=\"og:image:height\" content=\"123\" \/>\r\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\r\n<meta name=\"author\" content=\"ZappySys\" \/>\r\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\r\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/zappysys\/\" \/>\r\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"ZappySys\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/zappysys.com\/blog\/get-data-from-facebook-in-ssis-using-rest-api\/\",\"url\":\"https:\/\/zappysys.com\/blog\/get-data-from-facebook-in-ssis-using-rest-api\/\",\"name\":\"How to get data from Facebook in SSIS using REST API | ZappySys Blog\",\"isPartOf\":{\"@id\":\"https:\/\/zappysys.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/zappysys.com\/blog\/get-data-from-facebook-in-ssis-using-rest-api\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/zappysys.com\/blog\/get-data-from-facebook-in-ssis-using-rest-api\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/01\/facebook-api-integration.png\",\"datePublished\":\"2016-01-11T15:41:54+00:00\",\"dateModified\":\"2025-04-07T12:57:41+00:00\",\"author\":{\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/2756c237457fbc95d82cb38962f81f82\"},\"description\":\"Learn how to get data from Facebook in SSIS using REST API Calls. Easy to use drag and drop approach without coding will make your integration super easy\",\"breadcrumb\":{\"@id\":\"https:\/\/zappysys.com\/blog\/get-data-from-facebook-in-ssis-using-rest-api\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/zappysys.com\/blog\/get-data-from-facebook-in-ssis-using-rest-api\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/zappysys.com\/blog\/get-data-from-facebook-in-ssis-using-rest-api\/#primaryimage\",\"url\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/01\/facebook-api-integration.png\",\"contentUrl\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/01\/facebook-api-integration.png\",\"width\":123,\"height\":123},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/zappysys.com\/blog\/get-data-from-facebook-in-ssis-using-rest-api\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/zappysys.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to get data from Facebook in SSIS using REST API\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/zappysys.com\/blog\/#website\",\"url\":\"https:\/\/zappysys.com\/blog\/\",\"name\":\"ZappySys Blog\",\"description\":\"SSIS \/ ODBC Drivers \/ API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/zappysys.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/2756c237457fbc95d82cb38962f81f82\",\"name\":\"ZappySys\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5c9be148088ba9b8af8e955c5f7c22b5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5c9be148088ba9b8af8e955c5f7c22b5?s=96&d=mm&r=g\",\"caption\":\"ZappySys\"},\"sameAs\":[\"http:\/\/www.zappysys.com\/\",\"https:\/\/www.facebook.com\/ZappySys\/\",\"https:\/\/twitter.com\/https:\/\/twitter.com\/zappysys\/\"],\"url\":\"https:\/\/zappysys.com\/blog\/author\/admin\/\"}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to get data from Facebook in SSIS using REST API | ZappySys Blog","description":"Learn how to get data from Facebook in SSIS using REST API Calls. Easy to use drag and drop approach without coding will make your integration super easy","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/zappysys.com\/blog\/get-data-from-facebook-in-ssis-using-rest-api\/","og_locale":"en_US","og_type":"article","og_title":"How to get data from Facebook in SSIS using REST API | ZappySys Blog","og_description":"Learn how to get data from Facebook in SSIS using REST API Calls. Easy to use drag and drop approach without coding will make your integration super easy","og_url":"https:\/\/zappysys.com\/blog\/get-data-from-facebook-in-ssis-using-rest-api\/","og_site_name":"ZappySys Blog","article_author":"https:\/\/www.facebook.com\/ZappySys\/","article_published_time":"2016-01-11T15:41:54+00:00","article_modified_time":"2025-04-07T12:57:41+00:00","og_image":[{"width":123,"height":123,"url":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/01\/facebook-api-integration.png","type":"image\/png"}],"author":"ZappySys","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/zappysys\/","twitter_misc":{"Written by":"ZappySys","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/zappysys.com\/blog\/get-data-from-facebook-in-ssis-using-rest-api\/","url":"https:\/\/zappysys.com\/blog\/get-data-from-facebook-in-ssis-using-rest-api\/","name":"How to get data from Facebook in SSIS using REST API | ZappySys Blog","isPartOf":{"@id":"https:\/\/zappysys.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/zappysys.com\/blog\/get-data-from-facebook-in-ssis-using-rest-api\/#primaryimage"},"image":{"@id":"https:\/\/zappysys.com\/blog\/get-data-from-facebook-in-ssis-using-rest-api\/#primaryimage"},"thumbnailUrl":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/01\/facebook-api-integration.png","datePublished":"2016-01-11T15:41:54+00:00","dateModified":"2025-04-07T12:57:41+00:00","author":{"@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/2756c237457fbc95d82cb38962f81f82"},"description":"Learn how to get data from Facebook in SSIS using REST API Calls. Easy to use drag and drop approach without coding will make your integration super easy","breadcrumb":{"@id":"https:\/\/zappysys.com\/blog\/get-data-from-facebook-in-ssis-using-rest-api\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/zappysys.com\/blog\/get-data-from-facebook-in-ssis-using-rest-api\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zappysys.com\/blog\/get-data-from-facebook-in-ssis-using-rest-api\/#primaryimage","url":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/01\/facebook-api-integration.png","contentUrl":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/01\/facebook-api-integration.png","width":123,"height":123},{"@type":"BreadcrumbList","@id":"https:\/\/zappysys.com\/blog\/get-data-from-facebook-in-ssis-using-rest-api\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/zappysys.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to get data from Facebook in SSIS using REST API"}]},{"@type":"WebSite","@id":"https:\/\/zappysys.com\/blog\/#website","url":"https:\/\/zappysys.com\/blog\/","name":"ZappySys Blog","description":"SSIS \/ ODBC Drivers \/ API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/zappysys.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/2756c237457fbc95d82cb38962f81f82","name":"ZappySys","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5c9be148088ba9b8af8e955c5f7c22b5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5c9be148088ba9b8af8e955c5f7c22b5?s=96&d=mm&r=g","caption":"ZappySys"},"sameAs":["http:\/\/www.zappysys.com\/","https:\/\/www.facebook.com\/ZappySys\/","https:\/\/twitter.com\/https:\/\/twitter.com\/zappysys\/"],"url":"https:\/\/zappysys.com\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/320"}],"collection":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/comments?post=320"}],"version-history":[{"count":16,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/320\/revisions"}],"predecessor-version":[{"id":11339,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/320\/revisions\/11339"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/media\/1667"}],"wp:attachment":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/media?parent=320"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/categories?post=320"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/tags?post=320"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}