Facebook and SharePoint Integration

 

Facebook data sources like posts, friend lists and followers can be integrated codeless with SharePoint on-premises using the Layer2 Business Data List Connector. In case you are looking for Online data integration, you will find the right tool here.

 

sharepoint integration layer2 bdlc

Benefits of Facebook Integration in SharePoint

 

  • Very easy to setup in a few minutes: Create a SharePoint list, click "Connect to external data source" in the list settings, select the data provider, enter connection settings and data query as shown below. That's it.
  • No changes in the ODBC data source required: No programming, no additional tools.
  • Connected list data always up-to-date: The connected ODBC data query updates automatically in background (via SharePoint Timer Job), or alternatively, on-demand (Action Menu / Ribbon Button, URL, via workflow, API).
  • One-way and optional two-way connection: You can write-back the changes made in the SharePoint list to the external ODBC data source automatically with full CRUD (Create / Update / Delete) functionality. The SharePoint list can act as a full-featured front-end for external systems.
  • Well-known BCS "external list" issues and limitations are completely solved: ALL list features are to you. Views, sorting and grouping, filters, calculated fields, search, managed metadata. Lookups, additional columns and attachments can be created as normal. All kind of lists can be used, e.g. contacts, tasks, calendar, or custom lists. You can take external data offline via Outlook.
  • Workflows and notifications on external data change: List workflows and change notifications per RSS or email can be used to take business actions in SharePoint, when external ODBC data records are changed.
  • Application logging, reporting, and notifications: A SharePoint list is used to store settings and log information. SharePoint item versioning and workflows can be used to manage reporting and notifications. Direct notification per email in case of errors is supported as well.
  • Highest Security, best performance, easy to maintain: SharePoint Secure Store can be used to store security relevant configuration information safely in one central place. Users are working with the SharePoint lists as an external data cache with highest security and performance. Large data sources can be synchronized.
  • 100+ more external systems supported: Layer2 Data Providers included (e.g. for external SharePoint or Office 365, Exchange, Dynamics ERP/CRM, OData, XML/RSS, SOAP), vendor specific data providers can be used (e.g. SQL Server Oracle, MySQL etc.), 3rd party data providers also supported, e.g. for custom ERP/CRM, Facebook or Twitter. See here for supported systems and applications.

Facebook Specific SharePoint List Configuration Settings

 

Preparations on Facebook:

 

  • You'll need a Facebook developer account to get started. If you don't have one upgrade your personal facebook account to a facebook developer account now at https://developers.facebook.com. Skip this step, if you already have a developer account.
  • Choose Apps in the header navigation and select Add a New App. Give it a valid name and a category and hit “Continue“. Once your App is created, it will have an App ID and an App Secret which are necessary for the connection.
  • Go to settings and set your “App Domains“ to “http://localhost“. Click “Add Platform“ and add a website. Set the Site URL to “http://localhost/“ as shown here below. For more information about creating a facebook App visit https://developers.facebook.com/docs/apps/register.

 

facebook app configuration

 

Figure 1: The App Settings in your Facebook Developer site.

 

  • Install the CData Povider for Facebook that‘s not part of the Layer2 Cloud Connector and should be installed separately from the vendor's product page which requires extra licensing.
  • Open the ODBC Driver for Facebook and create a new connection. (The CData ODBC Driver for Facebook is a standards-based ODBC driver for the Windows platform; it is managed using Windows tools. All information about this provider can be found by clicking “Help“ in the provider interface or in an attached file named help.htm in the folder where you once installed the provider).
  • You need to give a name for your connection and then you need to write the App ID, the App Secret and the Site URL you from your facebook App and then click “Test Connection“. A confirmation message will be shown that your facebook authorization is successfully done.

 

Facebook DSN settings

 

 Figure 2: The providers ODBC connection settings. 

 

  • Once a DSN is configured, you can use it from our Cloud Connector or BDLC within your domain. By default, the driver models the current version of the Facebook Graph API, version 2.3, as bidirectional tables. Versions 2.2, 2.1, and 2.0 can be specified in the version property. Most tables require user authentication as well as application authentication. Facebook uses the OAuth authentication standard. OAuth requires the authenticating user to interact with Facebook using the browse.
  • Right to the Connection Tab at the top of CData ODBC Driver for facebook – DSN Configuration is the “Tables“ Tab, click it and see tables and views names which are exposed for data sources that support both retrieving and/or updating data. The tables are normalized and contain an id column, which is the primary key. This behavior is consistent across all tables in the product. Go back to the help page of the CData provider for more information.

 

In the SharePoint General List Settings click "Connect to external data source". In the BDLC form, the data source must be configured as follows to connect to Facebook using the .Net Framework Data Provider for Odbc.

 

facebook sharepoint integration

 

 Figure 3: Example connection configuration to connect a native SharePoint list to the comments of a Facebook post via Layer2 Business Data List Connector.

 

Please note the following specific settings:

 

  • The data provider supports bi-directional synchronizations with limitations. Please see the provider documentation for details.
  • Make a select statement to retrieve your data from a desired table or a view like Comments, Likes, Pages, Posts, Users, Friends, Events, Games, Groups, Books, and many others. For more information about select statements, read the help file provided by the vendor.
  • In the select example above, Target stands for the Id of the Post of which you want to get all comments. You can get a post’s Id by making a select from Posts that would retrieve all your posts with all their ids and many other columns. Message is that column which contains the text of a comment.
  • ID is set as a primary key and the background update is enabled so that you can comment from your SharePoint list in easy steps: Add a new item in your list, specify your target, give any number as id (which will be corrected automatically and regenerated) and write your comment in the message field. On the other hand, only those comments written through SharePoint list, that associated with your facebook App, can be edited or deleted. In other words, users can only edit/delete their own comments published by the same app.
  • Sure you can make another SharePoint list for your Posts which can be created, deleted, and queried for a Target based on either the Target or Id. However, facebook does not allow posts to be updated.
  • To insert a post, from your SharePoint list you will need to specify the Target and Message of the post. If no target is specified, the post will be posted to the authenticated user's wall.
  • You can map your data fields to specific external source fields in the Layer2 Business Data List Connector. Please take care about data types (simple type conversions are supported).
  • Please enter an appropriate primary key (column with unique values), depending on query (see data preview for this).
  • No installation or changes are required at the ODBC data source or data destination.
  • No programming required for setup a connection and sync.
  • No need to open your local network for access from outside.

Facebook Connection Details

 

Provider:
.Net Framework Data Provider for Odbc

Connection string sample:
DSN=myFacebookODBCName

 

Select Statement samples:
SELECT * from posts WHERE

 

SELECT * from comments WHERE Target = 'myPostId'

SharePoint Integration via Facebook - Examples, Known Issues and Workarounds

 

  • You cannot update posts.
  • Only comments created with your Facebook app can be edited or deleted.
  • The data provider supports bi-directional synchronizations with limitations. Please see the provider documentation for details.

 

Please contact [email protected] for help.

Ready to go next steps?

Layer2 leading solutions product regsitration icon: a grey square with a big orange pen symbol.

Register for free download.

Keep your Sharepoint in sync. Download and try today.

Contact Us Icon for Layer2 leading solutions

Questions? Contact us

We are here to help. Contact us and our consulting will be happy to answer your questions.