Endire
Elite Member
- Mar 27, 2012
- 1,756
- 1,075
This tutorial assumes that you have your own hosting, you know at least a little HTML and CSS, and that you are somewhat technically capable.
Note that a Facebook landing page application is essentially a web page displayed from within the Facebook framework. You can do virtually anything like a contact form, opt-in form, or just a simple web page. In this tutorial we?ll just be talking about the technical steps and not how to write all the code for the page.
Step 1: Create your landing page
Open a code editor or basic text editor and start building a new web page. Save it as an HTML document. You should have some basic CSS to make this show up right in Facebook. The code below will make it so unsightly scroll bars to not appear in your application and also that it will fit in the dimensions currently outlined by Facebook.
Here is code that should either be placed within <script></script> tags on your HTML page or included in an external CSS document.
If you are unfamiliar with HTML, the link below provides some information on how to make a basic HTML page. Once you have your page finished, upload it to your server and then go the URL where it resides. You will need this URL in later steps.
http://www.wikihow.com/Create-a-Simple-Web-Page-With-HTML
Step 2: Make Your Facebook Application
Once you have your page built, you can begin the process of setting up your Facebook application. Note that you must have a Facebook account to build an application. Log in and go to https://developers.facebook.com/
Once there, follow these steps:
Adding your application to your page
This is the tricky part. You have to add the application to your page and to do this, there is a little work around that you have to do.
Create another HTML document that looks like this:
Note that you must take the app id from your new application (found in the application settings that you just configured) and the URL (not the secure one) from the first HTML page you created.
Upload the page to your server and then visit it. You should see your link. Click on it (note: make sure you are still logged into facebook). A popup will appear with a dropdown asking which application you would like to add to your page. Choose the name of the one you just created and BAM!
Now go to your fan page and see your new landing page.
Note that a Facebook landing page application is essentially a web page displayed from within the Facebook framework. You can do virtually anything like a contact form, opt-in form, or just a simple web page. In this tutorial we?ll just be talking about the technical steps and not how to write all the code for the page.
Step 1: Create your landing page
Open a code editor or basic text editor and start building a new web page. Save it as an HTML document. You should have some basic CSS to make this show up right in Facebook. The code below will make it so unsightly scroll bars to not appear in your application and also that it will fit in the dimensions currently outlined by Facebook.
Here is code that should either be placed within <script></script> tags on your HTML page or included in an external CSS document.
Code:
body
{
width:779px;
height:1000px;
overflow:hidden;
}
If you are unfamiliar with HTML, the link below provides some information on how to make a basic HTML page. Once you have your page finished, upload it to your server and then go the URL where it resides. You will need this URL in later steps.
http://www.wikihow.com/Create-a-Simple-Web-Page-With-HTML
Step 2: Make Your Facebook Application
Once you have your page built, you can begin the process of setting up your Facebook application. Note that you must have a Facebook account to build an application. Log in and go to https://developers.facebook.com/
Once there, follow these steps:
- Click the apps tab at the top of the screen
- Click create new app in top right hand corner of the screen
- Provide the app name and namespace (these can be whatever you want and don?t worry if you screw it up, you can always make another one).
- Leave web hosting unchecked (note that if you aren?t using your own server, you can use Facebook?s servers however that is beyond the scope of this tutorial).
- Oh and choose a category too.
- Click continue and fill out the captcha that appears
- On the next screen, click the ?app on Facebook? bar and more fields will appear.
- For the canvas URL, enter the URL for the web page you created earlier
- For the secure canvas URL, just add an s to the http
- Add a question mark to the end of both URLs
- Select the canvas width as fixed and the height as fluid (unless you have a specific height).
- The other settings you don?t really have to mess with to get this to work however the page tab one you will have to. The page tab will show up as a box on your fan page that visitors can click on to get to the app.
- Click on the ?Page tab? bar and fill in the fields with the same URLs and also name your tab. Note that whatever name you put in is the one that will show up for users. Don?t worry about it too much as you can change it later if you want.
- Upload an image for the page tab (100px by 100px).
- Click save changes (leave the settings page open in your browser because you will still need it for the next steps).
Adding your application to your page
This is the tricky part. You have to add the application to your page and to do this, there is a little work around that you have to do.
Create another HTML document that looks like this:
Code:
<html>
<head>
<title>Untitled Page</title>
</head>
<body>
<a href="https://www.facebook.com/dialog/pagetab?app_id=YOURAPPIDHERE&display=popup&next=http://www.yourdomain.com/yourfirsthtmlpage.htm">Add App To Page</a>
</body>
</html>
Note that you must take the app id from your new application (found in the application settings that you just configured) and the URL (not the secure one) from the first HTML page you created.
Upload the page to your server and then visit it. You should see your link. Click on it (note: make sure you are still logged into facebook). A popup will appear with a dropdown asking which application you would like to add to your page. Choose the name of the one you just created and BAM!
Now go to your fan page and see your new landing page.