Write “Hello User” Facebook Application using PHP

Category: How IT world operates Add comments

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!


Enjoyed this entry? Register to receive FREE updates via email

Enter your email address:

Delivered by FeedBurner





Tags of this article: ,,,,,,,,,,,,,.


Last update October 20, 2007

Digg this post | Post this post to del.icio.us | Favorite this post on Technorati | Stumble Upon this post | Bookmark on Yahoo! | Share on Facebook | Bookmark on Google |
Post to Reddit | Post to Slashdot Submit to Netscape | Post to Furl | Post to Spurl | Post to Rawsugar | Submit to Newsvine |
Post to Simpy Post to Tailrank | Smark this post | Fark this post | Blogmark this post | Post to Scuttle | Feed this link |
Post to Blinklist | Post to Wists Post to Blinkbits | Post to Connotea | Post to Netvouz | Post to Shadows | Post to linkagogo | Track co.mments of this post | Track comments of this page on ma.gnolia

Related Posts


  • Tai Tran’s Favorite Facebook Applications

  • The day (social media) people fear is near: Facebook’s gonna launch in Vietnam

  • Blogging in Facebook

  • Facebook tries to solve Privacy problems

  • Again, why Facebook will dominate the Vietnam market


  • Email To Friend

    Print This Post



    Leave a Reply

    WP Theme & Icons by N.Design Studio