This will be my first post on SharePoint 2013. The buzz around the App Model is huge and so I dove in on a very basic level. Just to show how easy an App can be hosted in SharePoint and can consume Data or connect to popular websites. Like Facebook.
No worries, no Authentication is being used. This Post it’s just to show how easy it is to create a SharePoint App and consume “free” data.
First things first
The very first thing we should do is follow the steps described by MS to setup your development machine for App Development.
Andrew Connell created a PS Script for this:
Create a new App
First start Visual Studio 2012 RC. Create a new Project and choose App for SharePoint 2013
Next give your App a name and fill in the Developer Site (created while setting up your app domain). I chose my default webapplication to be a Developer Site.
For this App we choose SharePoint-hosted.
Now we can see the App Template contains some modules for Scripts, Images, Pages and CSS files. Also notice the AppManifest.xml file which holds important info about your App.
For this app I use the standard Facebook Graph API. We can use jQuery to get JSON data from the url we like. In this example I chose Microsofts Facebook page.
To simply bind the data on my Default.aspx page I use KnockOut JS. This is a very easy and fast way of binding data.
The project that you can download, results in an App that is displaying Page data from Facebook. It looks like this: