Deliver superior customer experiences with an AI-driven platform for creating and deploying cognitive chatbots
Deliver Awesome UI with the most complete toolboxes for .NET, Web and Mobile development
Automate UI, load and performance testing for web, desktop and mobile
A complete cloud platform for an app or your entire digital business
Detect and predict anomalies by automating machine learning to achieve higher asset uptime and maximized yield
Automate decision processes with a no-code business rules engine
Optimize data integration with high-performance connectivity
Connect to any cloud or on-premises data source using a standard interface
Build engaging multi-channel web and digital experiences with intuitive web content management
Personalize and optimize the customer experience across digital touchpoints
Build, protect and deploy apps across any platform and mobile device
The content you're reading is getting on in years
This post is on the older side and its content may be out of date.
Be sure to visit our blogs homepage for our latest news, updates and information.
**Sample Code Available Here**
Facebook offers a C# API that allows you to display a friend list on your website. To implement this within Sitefinity, you must obtain a Facebook user account, obtain a Facebook API Key, download the Facebook SDK, bind a Repeater to your friend list, and upload this functionality as a user control, or create an external page as shown in this article, to Sitefinity.
Here is what you need to get started:
1. First, you must obtain a Facebook user account and add some friends. This can be done on Facebook's website.
2. Once that is complete, you must obtain an Developer API and Secret key by going to Facebook's developer website API Key generator. If you have not logged in, you will be asked for your user name and password prior to getting the key generated. Add the name of your application to that form. You will then see a the API and Secret Key on the next screen.
3. Download the Facebook SDK and place all of the files in the bin folder of your application.
You application should look like this:
Authenticating to Facebook
Application users must login to Facebook before using an application. In your default.aspx page, as shown above, you must create a method to authenticate your user as shown below:
In your Web.config, you must provide the API, Secret Key and Callback URL for authentication:
The Callback is where your user goes after he or she authenticates to Facebook using your application. In this case, the value is the location of my virtual directory for this project.
Binding the Data
I will bind a repeater to my Facebook buddy list. To shorten the list of friends, I will create a buddy list. This is a subset of friends on my Facebook profile. I will use Boyan and Ivan who are Sitefinity bloggers.
To create the list, follow these steps:
1. Login to your Facebook account
2. On the top navigation, click Friends
3. Click Create New List
4. To add friends, click Edit this List
5. Follow the on-screen instructions
6. From the query string, copy and paste the list ID as shown below in bold:
7. Bind a Repeater called Repeater1 to the data as shown below:
Once code has been implemented, your end result would look something like this:
From here, you could create an External Page from the default.aspx file. For more info, please read Working with Pages > External Pages in our User Manual. You could also copy and paste the page's contents into a user control and upload it to Sitefinity.
View all posts from The Progress Team on the Progress blog. Connect with us about all things application development and deployment, data integration and digital business.
Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.
Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.