How to make a Facebook app
Facebook developer :: futureX |
We all know that Facebook have biggest user base as compared to other social networking website and that can help you to reach its 900+ million user base.
Building a Facebook application is a very vast topic to cover. For this tutorial I'll just keep GET STARTED approach. I am assuming :
1. You know HTML , PHP, Javascript or any other language. If not you must learn them in order to make Facebook applications.
2. Have an account on Facebook.
3. Have a web server(LAMP or WAMP) installed in your machine.
for developer account in Facebook visit
https://developers.facebook.com
Set up new application :
1. Provide your application name: my_app
2. Agree to Facebook terms and click on "Create Application".
3. Register your Facebook application and note down "Application ID" & "Secret".
Get the php-sdk from git hub link:
https://github.com/facebook/facebook-php-sdk
4. Download whole sdk and unzip at document root (at http://localhost/)
5. Start your web server
6. Now go to link : http://localhost/facebook-php-sdk-master/examples/example.php (assuming that you have unzipped the sdk at root all files inside sdk have permission to execute)
7. If you see "public profile of Naitik" and profile picture of Naitik, then congrats you are now ready to make your own applications.
Canvas Page
Go to the 'Settings' of application that you have created put the link of application in App Domain.
If you were following the tutorial put http://localhost/facebook-php-sdk-master/examples/ at 'App Domain'.
Now in your document root rename example file inside /facebook-php-sdk-master/examples/example.php to index.php
I am assuming that you have taken name space for your "Canvas Page" if not Facebook will generate a random number and attach it to your application.
Edit Canvas URL and add http://localhost/facebook-php-sdk-master/examples/ to input box.
Go to your Facebook app link, if everythingh is alright you will see some example application in Facebook canvas. But this application is running on your local server in order to make your application visible to others you'll need to host your application at third party server.
0 comments: