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.
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.
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.
Figure 3: Example connection configuration to connect a native SharePoint
list to the comments of a Facebook post via Layer2 Business Data List
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
- 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
- No programming required for setup a connection and sync.
- No need to open your local network for access from outside.