Posts tagged: library

Write “Hello User” Facebook Application using PHP

By , October 20, 2007 12:55 am

1. Install Facebook Developer Application

Add The Facebook Developer Application

2. Install PHP Facebook API Client Library

Facebook API

Unzip the library into a web folder that is accessible by your PHP scripts.

3. Creating Your Application Profile And API Key

  1. Go to the developer panel, click “Set Up New Application”.
  2. Input application name
  3. Go to “Optional Fields”, input “Callback Url” with the location of your script. This is the public URL on your webserver where the Facebook application will be.
  4. Input “Canvas Page URL”. This is your application URL within Facebook. The application named “Hello World” would make the full URL http://apps.facebook.com/helloworld
  5. “Can your application be added on Facebook?” => “Yes”
  6. Check “Developer Mode” checkbox until you have completed the application.
  7. Under “Integration Points” fill out “Side Nav URL” with the full “Canvas Page URL” http://apps.facebook.com/helloworld. This allows users to add your application to their Facebook left side bar navigation.
  8. Obtain the API Key and Secrete

4. Hello Facebook!

<?php
require_once('facebook/client/facebook.php');/* initialize the facebook API with your application API Key and Secrete */
$facebook = new Facebook(YOUR_API_KEY,YOUR_SECRETE_CODE);?>
Hello <fb:name uid='<?php echo $fb_user; ?>' useyou='false' possessive='true' />! Welcome to Facebook application!

And there, we’re done!

Write "Hello User" Facebook Application using PHP

By , October 20, 2007 12:55 am

1. Install Facebook Developer Application

Add The Facebook Developer Application

2. Install PHP Facebook API Client Library

Facebook API

Unzip the library into a web folder that is accessible by your PHP scripts.

3. Creating Your Application Profile And API Key

  1. Go to the developer panel, click “Set Up New Application”.
  2. Input application name
  3. Go to “Optional Fields”, input “Callback Url” with the location of your script. This is the public URL on your webserver where the Facebook application will be.
  4. Input “Canvas Page URL”. This is your application URL within Facebook. The application named “Hello World” would make the full URL http://apps.facebook.com/helloworld
  5. “Can your application be added on Facebook?” => “Yes”
  6. Check “Developer Mode” checkbox until you have completed the application.
  7. Under “Integration Points” fill out “Side Nav URL” with the full “Canvas Page URL” http://apps.facebook.com/helloworld. This allows users to add your application to their Facebook left side bar navigation.
  8. Obtain the API Key and Secrete

4. Hello Facebook!

<?php
require_once('facebook/client/facebook.php');/* initialize the facebook API with your application API Key and Secrete */
$facebook = new Facebook(YOUR_API_KEY,YOUR_SECRETE_CODE);?>
Hello <fb:name uid='<?php echo $fb_user; ?>' useyou='false' possessive='true' />! Welcome to Facebook application!

And there, we’re done!

Panorama Theme by Themocracy