Today I developed a simple facebook application that reads and parses RSS from phpResource. It’s my first one during the first touch of facebook platform. See my first app here:
http://apps.facebook.com/phpresource/
It’s very easy to add a facebook app. I want to share how easy it was to add an app in facebook. If you did not work on facebook app but want to develop your first one in an hour, here is a summary of working steps for you that will help you move very easily:
1. Go to http://developers.facebook.com/resources.php and download a client library. I downloaded PHP (4 and 5) client library.
So you have the “facebook-flatform” files(extracted from facebook-flatform.tar.gz) to work on. I put the files into a dir named “facebook” (renamed dir “facebook-platform” to “facebook”) in my web server.
2. Add facebook developer application (go to http://www.facebook.com/developers/ and see option to setup application). You will be given an app secret key and an api key. Note that these keys are very important.
3. Go to http://developers.facebook.com/step_by_step.php and read and follow their easier guidelines.
4. While you are following the guidelines as per step 3, you need to put value in “Callback Url” field. It’s the URL where you worked with “facebook-platform” files. For my case, it’s the “facebook” dir where I put the platform files. Before you put the callback URL, you need to do the following:
- write the sample code (into a file under platform dir “client”) provided in http://developers.facebook.com/step_by_step.php, don’t forget to use your key credentials. Say your filename is abcd.php
- write your target script which goes below the initial codes guided by http://developers.facebook.com/step_by_step.php. For my case, it was like following:
—————————–
<?php
require_once 'appinclude.php';
echo “<p>”;
require_once ‘phpresource.php’;
echo “</p>”;
?>
—————————–
where phpresource.php has its own output. You can see it here:
http://www.rupom.com/facebook/client/phpresource.php
Now you know what to put as the callback URL. It’s like http://www.yourdomain.com/facebook-platform/client/abcd.php, for my case it should be like: http://www.rupom.com/facebook/client/abcd.php (as I renamed “facebook-platform” to “facebook”).Save the settings and see your app URL. You are DONE!!
I will share more in future.
Thanks.
–
Rupom





March 7, 2008 at 2:47 pm |
Nice application. I am also developing a facebook application. Your tutorial helps me lot.
Thanks
March 21, 2008 at 4:42 pm |
Saidur,
Glad to hear that my post helped you.
Thanks.
–
Rupom
February 13, 2009 at 10:28 pm |
thank you bhaia for this post. really its a nice tutorial for start “hello world” FB application.