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
- Go to the developer panel, click “Set Up New Application”.
- Input application name
- 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.
- 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
- “Can your application be added on Facebook?” => “Yes”
- Check “Developer Mode” checkbox until you have completed the application.
- 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.
- 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!
Uncategorized
|
api, application, development, facebook, library, navigation, panel, php, profile, programming, server, tutorial, url, user
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
- Go to the developer panel, click “Set Up New Application”.
- Input application name
- 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.
- 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
- “Can your application be added on Facebook?” => “Yes”
- Check “Developer Mode” checkbox until you have completed the application.
- 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.
- 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!
Uncategorized
|
api, application, development, facebook, library, navigation, panel, php, profile, programming, server, tutorial, url, user