Create a Facebook App And Add Support in Thesis

Share & Comment

Facebook-App-ID.png

So you are excited about adding Facebook Social Plugins to your website. The Facebook Platform allows you to make your website more social by providing various Social Plugins – “Like” button, Like Box, Comment Box, Activity Stream, Send Button, Comments, Recommendations, Login/Register etc.

In this series we will discuss “Like” button, Like Box, Comment Box, Activity Stream, Send Button, Comments, Recommendations. So Lets get started.

As the first step you will have to create a Facebook App to use the JavaScript SDK.

The JavaScript SDK requires that you register your website with Facebook to get an (appId). The appId is a unique identifier for your site that ensures that we have the right level of security in place between the user and your website.

Facebook Developers – Facebook for Websites

Lets head over to the register your website page and enter the following details:Facebook Create an App

  1. Site name: Byteindia ( Replace with whatever you call your website )
  2. Site URL: http://www.techeach.com/   (Replace with your website URL. Remember the trailing / )
  3. Locale: English (US)

Click “Create App” and you will be will be redirected to the next page displaying your App ID and secret.

Facebook App ID

Now that you have created your Facebook App, we are all set to start adding support to our website.

Lets Add Facebook Tags to Thesis

Meta Tags allow you to specify structured information about your webpages. Facebook developers wrote on their website:

The Open Graph protocol enables you to integrate your Web pages into the social graph. This means when a user clicks a Like button on your page, a connection is made between your page and the user. Your page will show up in the same places that Facebook pages show up, and you can target ads to people who like your content. The structured data you provide via the Open Graph protocol defines how your page will be represented on Facebook.

Open your “custom_functions.php” in your favorite editor and enter the following code at the end of file:

Add Facebook Javascript SDK

Now we need to add Facebook Javascript SDK to our blog before we can start using the Facebook XFBML tags.

In the code remember to change the “YOUR APP ID” with your Application ID and “YOUR ID” with your Facebook profile ID.

That’s it. Next up in the series we’ll start implementing some Social Plugins. Subscribe and don’t miss it.

Vijay Sharma

Vijay Sharma is an aspiring tech blogger and internet consultant focused on helping the community with the tips and tricks that can help you build better web business.