How to configure Facebook Wall App Part?

 

Step 1: In order to use Facebook Wall App Part, you need to first register an App in Facebook. You can refer below steps on How to Create an App in Facebook

 

a): Login into Facebook Developers account to create a new App.

 

 

 

b): You will be asked for “Register as a Developer”. Complete the registration steps and then click on Create new App button.

 

 

 

 

 

 

​c): Enter a title for the App, leave the rest of the fields as blank.

 

 

Note: you may be asked for entering a capcha value for verification.

 

d): This will create a basic app for Facebook. The screen will look as shown in below screen shot:

 

 

 

e): Note down the App ID and App Secret in the above screen shot. This would be required in our SharePoint App for interaction with Facebook API. Click on Save Changes to complete the process.

 

Step 2: Add the Facebook Wall App Part in SharePoint 2013. You can refer to below steps on How to add an App Part in SharePoint 2013.

 

a). Navigate to Site Contents à Site Pages link to create a new page in which the App Part would be added.

 

 

 

b). Click on the Link “New Wiki Page” to add a new wiki page in your SharePoint site.

 

 

 

c). Give a name to your page and click “Create” to create a new page.

 

 

d). As soon as the page is created, you will be navigated automatically to the newly created page. Open the “Insert” Tab and click on the image titled as “App Part”.

 

 

 

​e). Once clicked, you will see list of the App parts deployed in your site. Select the desired app part and click “Add”.

 

 

 

f). After the App Part is added, Save the page, you will see the app part rendered in your page.

 

 

 

Step 4: Configure your Facebook Wall App Part by clicking on the “Edit Web Part” menu on right side of your App Part (as shown in below screen shot)

 

 

 

Step 5: Expand the node named “Facebook Wall Settings” in App Part Properties. You can fill the App ID and App Secret with the values that you noted down from the app created in Facebook.

 

 

 

Step 6: To get the Code, you will need to generate a link and paste it on the browser. Follow the below steps to get the Facebook code:

 

a). Edit the below URL by replacing the token {AppID} with your App ID.

https://www.facebook.com/dialog/oauth?client_id={AppID}&redirect_uri=http://www.facebook.com/connect/login_success.html&scope=read_stream&response_type=token

b). Paste the above url in browser to get a short term access token. You may be asked for navigation to the app you created in above steps (see screen shot below)

 

 

 

c). You will need to allow “Access posts in your news Feed”

 

 

 

d). Once done you will get a success message as shown in below screen shot. The access token generated this was has very limited timeout.

 

 

 

e). To generate a long term token, copy the access token that you got in above step and paste it in the url below with other information like AppID and AppSecret.

https://graph.facebook.com/oauth/access_token?grant_type=fb_exchange_token&client_id={AppID}&client_secret={AppSecret}&fb_exchange_token={AccessToken}

f). After pasting the above url in browser, you will get a long term access token as shown below.

 

 

 

g). Copy the access token and paste it in the “Code” property of your app part.

 

h). Enter the “Redirect Url” as: http://www.facebook.com/connect/login_success.html. This should be the same url as generated in step 4 (the url without any token)

 

i). Enter the Facebook User ID/User Name in the property “User ID/User Name/Page ID”

 

j). The rest of the properties are optional and can be changed as per requirement.

 

Once configured, you will be able to see the user feeds in the Facebook Wall App Part.

 

 

© 2013 TechPerspect Software Pvt. Ltd. All Rights Reserved.