Using Facebook PHP SDK v4 – Part 1

I always have ideas on how to do things in a different way. Facebook today is like an aggregator with loads of information that can be mined/used to generate revenue/business for various simple ideas. Facebook is an excellent portal which not only provides avenues for advertising/social fall through, but also provides for instant access to millions of possible clients. If one is interested or trying to launch business, I think Facebook is a very essential part of bringing in direct customers and being a part of the social community advert networks. Google is one such other social portal which can be used for similar purposes.

Basic idea is to allow people to register/login to your website using the credentials supplied by FB/Google, get relevant data from the different portals, correlate and make the data usable (blah blah big data, SEO and data mining stuff here), and expedite the process of knowing, acknowledging, building and scaling your business. Any idea big or small today has a need to get accepted among social groups.

I am pretty sure we are all aware of this. So was I but my laziness got the better of me and would not allow me to start taking step in that direction. And after months of deliberation, I finally have decided to venture into this field. I will not tell you what my idea is until it is partially implemented but in short, I have decided to use the social power to my advantage Smile. I started up by using my FB account and signing in as a developer (https://developers.facebook.com/).

Once logged in, click on Apps and create your new app. Now goto settings on the left hand side, add platform, select desktop and give the URL of the website you are going to use for setting up your business idea. Save changes and head over to github FB PHP SDK v4 (https://github.com/facebook/facebook-php-sdk-v4) and download the master branch. One thing to note is that you will need a webhost running PHP 5.4 for this FB SDK to work. And before you ask me why I can’t use the older one. Well, the new v4 is much better organized, totally object oriented, uses nice features of 5.4 and removes all the cluttering from 5.3.

There are quite a few hosting providers giving 5.4. For the time being, I am using www.2freehosting.com which gives me a nice subdomain free of charge. Also runs 5.4 and a host of other things. Anyways, register for something, upload the FB SDK to your account and you are ready to go. In the next part, I will show write a basic PHP page which will use the FB PHP SDK v4 to ask for certain permissions from FB and show how we can harness the power of FB. Google thing will hopefully follow later on.

All the best for your idea to fly and garner success!