Support
- Advanced Backup
- Client Side
- Cloud Enterprise
- ColdFusion
- Control Panel
- cPanel
- Customer Portal
- DNS Information
- Dedicated Servers
- DirectAdmin
- Domain Name
- dotDefender
- Dreamweaver
- FileCatalyst
- Front Page
- FTP
- General Information
- Hosted Exchange & SharePoint
- IIS6
- IIS7
- Juniper Netscreen Firewalls
- Linux
- List Server
- MIVA Merchant
- MySQL
- Patching / Server Updates
- phpMyAdmin
- Plesk
- Policies and Procedures
- Premium Spam Filtering
- Programming
- 500 Error
- Accessdb 1
- Accessdb 2
- Aspmail
- Aspsqlinjection
- Aspupload
- Connectionstrings
- Faq Windows
- Locked Db
- Programming
- Use a JSP (Java) Redirect Script
- Conditional 301 Redirect
- Using ADOdb to Build a Database Agnostic PHP Application
- Store PHP Session Data in a Database with ADODB
- Use JQueryUI Sortable to Manipulate Sort Order in a Database Table
- Use PHP GD to Resize Images on Upload
- Add a Facebook Like Button to Your Website
- Add a Twitter Tweet Button to Your Website
- Enhance User Experience with JavaScript Form Validation
- Get Started Integrating FaceBook with the PHP-SDK
- Get Started with the Twitter API
- Ruby on Rails
- Search Engine Submission
- SharePoint 3
- SharePoint 2010
- SiteDesigner
- SmarterMail 3
- SmarterMail 4
- SmarterMail 5
- SmarterMail 6
- SmarterMail 7
- SmarterStats
- SmarterTrack
- SQL Server
- Secure Socket Layer (SSL)
- Uploading Your Website
- Video Tutorials
- Windows Server 2003
- Windows Server 2008
- Web Design
- WordPress
- Advanced Monitoring
- MediaWiki
- Enkompass
- Microsoft Outlook 2010
- Android
- Outlook Web Access
- Critical Availability Service
- NAS Data Transfer
- Customer Portal Demos
- Joomla
- Moodle
- Cloud Dedicated
- Gallery CMS
- phpBB
- Standard Monitoring
- Righteous Restore
- NAS (Network Attached Storage)
- Networking
- SmarterMail 8
- PCI Security Scan
- LinkTiger
- Windows Cloud VPS
- Linux Cloud VPS
- Linux VPS
- Windows VPS
- Hyper V
- ENSIM
- Alert Logic
- Webmin
- e107
- Vbulletin
- VPN
- Visual Vault
- Mozilla Thunderbird
- PyroCMS
- Active Directory
- Vmware Related
- Drupal
Get Started Integrating Facebook with the PHP-SDK
The FaceBook PHP-SDK simplifies some of the more complex tasks - like OAuth authentication - needed to integrate your website or application with Facebook. This article will illustrate how to register your application and install the PHP-SDK on any PHP supported Hosting.com Platform. After installing the PHP-SDK you will qbickly be able to build integrated features. For example, you can allow visitors to log into your site with their FaceBook account or sign up for a service you providing using a form pre-populated with their Facebook information.
Obtain a Facebook Application ID and Secret
Go to http://www.facebook.com/developers/ and log into Facebook.
Click on the +New Application to register your application.

If your account is not verified you will need to do that at this time. Click on the mobile phone link and you will receive a text message that contains a confirmation code. Enter the confirmation code into the box and click Confirm.

Enter and App Name Agree to the Terms and click Create App.

Enter the captcha.

On the About tab provide basic information about your website/application.

Click Save Changes at the bottom. On the next page you will be provided with your App ID, API Key and App Secret. You will need this information for the PHP-SDK.
You will also be provided with a link for Example Code. This link provides instructions to download and install the PHP-SDK.

Click on the Web Site tab and enter the url to your application and your domain name.

Install the Facebook PHP SDK
Step 1: Download Facebook’s PHP Library
From SSH: Extract this archive into a directory on your hosting server where you can host and run PHP code.
$ curl -L http://github.com/facebook/php-sdk/tarball/master | tar xvz
$ mv facebook-php-sdk-* facebook-php-sdk
$ cp facebook-php-sdk/examples/example.php index.php
If you are not comfortable with SSH you can download it from https://github.com/facebook/php-sdk/. Click the Downloads button, unpack the files and upload them to your hosting server. Make a copy of examples/example.php and name it index.php.
Step 2: Replace the IDs in index.php to have your own app information
<?php
// Awesome Facebook Application
//
// Name: Your app name
//
require_once 'facebook-php-sdk/src/facebook.php';
// Create our Application instance.
$facebook = new Facebook(array(
'appId' => '123456789',
'secret' => '222222fffffffffffeeeeeeeeeee333333333',
'cookie' => true,
));
Browse to your http://yoursite.com/examples/index.php to test it outside of Facebook.
Step 3: Test Your Application on FaceBook
To test your application on Facebook you need to provide two more pieces of information to Facebook. Edit your application and click on the Facebook integration tab.
At a minimum enter values in the Canvas Page and URL fields.

Once you have provided your Cavas Page and URL you should be able to browser to http://apps.facebook.com/yourapp/ to see your site load.
