Skip to main content

Creating Facebook Applications Tutorials [Part-1] The Setup

If you are reading this post then you must be probably wondering about "How do people make those Funny Horoscope Apps and those Top Mutual Friends Apps on Facebook? ". You have come to the right place my friend.. Because I was in that situation a couple of months ago. So here I bring to you my experience on Creating Facebook apps from scratch. In this Tutorial Series I will cover topic from the Basics of Creating Facebook Apps to the Best Practices of App development like Tagging, Photo Uploads, Games, Socializing your site etc.. I will also show you how to make a simple Facebook app Called "Top Mutual Friends". 

But before I begin I felt free to assume that You have sound Knowledge on PHP MySQL, JavaScript and HTML n CSS of-course. If you have no idea what these things are than please go through w3schools.com to get a brief idea about the languages and continue with this tutorial.

OK! Lets get Started with the Setting up your Developers Account then.. :)



Before you can start creating apps, you need to have a facebook developers account. To have one is as easy as opening a website (literally). Just go to http://developers.facebook.com after signing in to your facebook account. If you are new to Facebook Developers (Which you obviously are :P) and have opened it for the first time then, you will see a webpage something like this below. 



Facebook Developers Website SnapShop
http://developers.facebook.com

You will see a  Register Now  button on top. Click on it!. Now if you have a verified facebook account, your "Registration" (I skipped most of it.. Was more like a survey :D) will continue with the normal flow. Or else it will ask you to verify your account via Phone(Please don't use your Mom's phone coz your facebook "updates" will get texted to her XD.. Eee.. ). 




Once you have verified and all set, Click on the button again. Accept the terms and conditions. You may or may NOT fill in the second step which looks like this on the right --->
Same on the third step. Hit OK. and "Yay! you are a Facebook Developer now" - Thats what they said :P

Once you have been welcomed as an developer, you will be redirected to your Apps Dashboard. Or if somehow got lost exploring the documentations(i will be covering those in later posts), You can click on the  Apps  menu on top. 


Now quickly click on  + Create New App  button. A Dialog box will pop up asking for App's high-priority details like


  1. Your Apps Name : Your Applications Name which will appear on the search results . There is no restriction in choice of character but keep it within 32 chars. 
  2. App Name Space :  The app namespace is used for defining custom Open Graph actions and objects (e.g., namespace:action) and for the URL for Apps on Facebook (e.g., http://apps.facebook.com/namespace). Means its like a variable facebook uses to address your app. It doesnt accept Caps or Spaces. As a PHP developer i would recommend you to use an Underscore ( _ ) than a hyphen ( - )
  3. Web Hosting : If you already have a Web Host its well and good. If not you can apply for one at Heroku Services. You need a Web Host to host your app even if you are building apps inside facebook or even for websites with facebook login. You will get the idea why in my next blog.

Once you are done choosing an wonderful name and a namespace for your app. Hit Continue. After that you will be redirected to you App's setting page. 




Here you have do set some more fields before you can finally start building an App. 

Now the first thing you will notice about page is the App ID and the App Secret. App ID is the number that helps facebook to find your app from millions of apps. App Secret is like a key that helps to authenticate the Application and also is used to generate access tokens which gives the app access to users public/private data. Never share your App Secret or keep it public . You can reset  your app secret if it was disclosed by any chance. (Oops... I will have to reset mine now :D)







Fill in the details.. Keep in mind if you are hosing your app in a subdomain of website then do NOT include "www" in the url. Cahoose a category that your app belongs. Always enable the Sandbox Mode during development to avoid Negative feedback get your App removed before launching (True Story :( ).




Now Select how would you integrate your app with facebook.  The two options shown above are almost the same from the development perspective but still there are some differences. 


I would prefer "Apps on Facebook" if i have a SSL certificate i.e my website can also run on HTTPS Secure protocol. If you dont have that feature you can pay some extra bucks to your Web host and get it. This has been made mandatory by facebook on October. 


OR. If you want thing for free like me.. you can select "Website with Facebook Login" . Just give the URL to the address where you have hosted your app. on your web sever. You can use your Paid hosts or can use a free host with php that has CURL_INIT and JSON_DECODE functions enabled. I would recommend www.000webhost.com which provides unrestricted php access.


Now another difference between these two are, apps on facebook have their own side bar access etc. Which can be useful if you want to make Games or interactive applications on facebook. Games from Zenga like Farmville, MafiaWars, etc.. are integrated with this option. Whereas on the other hand the "website with facebook" option will redirect you to your site. I will go through this concept in my next posts. 


Choose the one that is best for you and Save.. We are done with the first step  of building a Facebook application. Until i write my next piece of tutorial about "Facebook App design Basics and Concepts". Do play around with the different options on the side menu.

Namaste!

(If you need any further help in starting your Apps, you can drop in your queries in the comments box and the author will make things simpler for you)

Comments

  1. thanks simpy for the 000webhost thing... tried a lot of them like this one before but 000webhost seems better... letsee how it works

    ReplyDelete
    Replies
    1. It provides unrestricted PHP access.. which is a good thing..

      Delete

Post a Comment

Popular posts from this blog

THE FIRST TIME

It was one of those typical weekends and I was  the typical lonely guy, sipping away my cup of coffee, all alone. It was just me and my phone enjoying each other's company on a weekend evening. It's not that I had no friends, I had fairly good friends but they had girlfriends. Believe me; the girlfriend always scores a victory over the friend when it comes to investment of attention and company. My thoughts were meandering across the vastness of my solitude when my phone started ringing abruptly.  It was Rohan, one of the few friends who actually call me. Rohan - Hey man, wass up? I sensed an obnoxious sense of dizziness in his voice. Me - Hey bro are you drunk? Rohan - Oh my God you know me so well. You are my true friend. It’s not just me, Vikash is also drunk. Vikash was my college roommate, another one of those saintly friends who still call me. Me - Oh God! What are you guys unto at this time? If this is an invitation for a booze party, you alr...

Never Too Late To Have a Happy Childhood

I love the statement of Walt Disney who quoted -- "Thats the real trouble with the world, too many people grow up". By the time we begin to understand enough about the world to ask the right questions, our visit is over, and someone else is visiting, asking the same questions. The carefree attitude was lost somewhere. As a child we had a different craze for chocolates, for toys and for everything sweet but our intentions were pure and pristine. We were innocent, we wanted happiness for everybody whether it was a friend or a foe. We had priorities set to a different level. For us happiness used to come in every small package whether its a delicious snack cooked by mom or a new book gifted by dad, or the 1st time we ride a  bicycle. We used to be busy with something every time, whether its watching the rainbow or counting the stars, or making strange imaginations from the clouds. Our days were short and life was fulfilled. We never knew what is Money a...

THE GIRL WHO BLOCKED ME

“Hello. Before you wonder who I am and why did I invade your privacy in this ludicrous manner, I want to tell you that I understand that this is the most uncivilized and discourteous way to start a conversation with some girl you have never known. The worst I could do was to take your phone number without your permission. I mean that is genuinely the worst way to approach a girl. But you have to know I had to send this message, to make my mind guilt free, to proudly reply to my conscience that at least I made an attempt and to win myself a conversation with you. I am sure all this is irrelevant and inconsequential for you but I want to confess that I may have practiced writing this message several times through several days. I might have visited your Facebook profile a few times. And I might have rehearsed a few times on how to cope up with the failure once I don't get any reply from you. But all these hardly diminish the fact that I have utmost respect for you and t...