Use Canvas to run Facebook Application inside Salesforce

by - 3:26 AM

In my last post here, I mentioned the steps to connect any application inside Salesforce using Canvas feature. Today, I designed a social connection application for Facebook, which pick my profile, authenticate me as user and load my details. The objective is to demonstrate how can an hosted application on other cloud/web platform can be successfully be hosted inside Salesforce

This application is hosted on top of Heroku platform (Ruby) as application. I hereby try to bring social platform of Facebook through this application inside Salesforce to add Salesforce experience to it. To create a facebook application and connect it to Salesforce follow these quick steps in the video I am listing here.This video entails some quick steps to create facebook social application, after this video, I'll use Salesforce Canvas platform to quickly connect it inside Salesforce and run on visualforce page.

The video credit goes to my all time favorite rockstar professor/friend (Richard Schneeman) here in Austin, Texas whom I am following for little long time. I love his narration in most of his video, a professor by job in neighborhood at University of Texas at Austin

Follow him at (@schneems on twitter)

In my last post, I created Heroku application from Salesforce but in here I am embedding the existing application inside Salesforce. Here on Facebook developer page, I can see my application listed (after following steps as shown in the video)

Now as I as jump back on Heroku Account (http//, I can see my application listed there owning some lovely name (this time as peaceful-coast, I just love their naming conventions

Install Heroku Toolbelt to connect to Heroku, cloned git code using Git command and edit the code, like I changed background color of application through textmate. After changing code I push back my code to Heroku using OSX terminal

Pushed Back the Code to Heroku right from my screen successfully using Heroku push command

This is how the Facebook application look like while running inside Salesforce platform

Alright, stay tuned, we are half way through, now few quick steps and Facebook apps will be running inside visualforce page. So lets keep moving. Create a new connected application inside Salesforce using Setup-> New

Create a new Salesforce Connected Application

Fill in callback url as  :
Canvas Application as :

After saving you can see the application as shown below

Now Create a VisualForce Page with one simple tag to plugin the Facebook Application and you are done, that's it

You May Also Like