Integrate Social Sign On in your PHP apps using HybridAuth

nt.social.network.big_

Integrating social sign-ons in a web application can become a tedious task because you need to take care of different endpoints, credentials and finally manage the oauth dance to get the access token. However, using HybridAuth package, this task can be easy as pie 🙂 Let’s have a look

In this example I will show you how to connect to Facebook and Twitter using HybridAuth. So you need to create two applications in Facebook and Twitter each. Save those app’s id and secret somewhere because we will need that in a minute.

Step 1: Install the Package via Composer

Composer is an excellent package manager for PHP apps. Let’s use that to install HybridAuth in our current projects scope. Add a composer.json file in your project path, or update it with the following contents if it already exists. But before that, make sure that you have composer installed in this machine.

{
    "require": {
        "hybridauth/hybridauth": "3.0.0.*@dev"
    }
}

now run the following command to install hybridauth

composer install

Step 2: Connect with Facebook

Let’s make a good use of this HybridAuth. This time we need to create two files, fb.php and hybrid.php. Make sure that your facebook app’s callback url points to this hybrid.php. FOllowing is the code of fb.php Continue reading “Integrate Social Sign On in your PHP apps using HybridAuth”

Building services like FriendFeed using PHP – Part2

Following the first installment in this series, here is the second part. In this part I will focus mainly on Bookmarking and News services supported by FriendFeed . Here we go Supported bookmarking services by FriendFeed 1. Del.icio.us 2. Furl 3. Google shared stuffs 4. Mag.nolia 5. Stumbleupon Except google shared stufss, all of the … Continue reading Building services like FriendFeed using PHP – Part2

Building services like FriendFeed using PHP – Part 1

Friendfeed is an excellent life streaming service aggregating all your feeds from different service providers, compile them together, build a social network among your known people and finally deliver all these feeds as a mashup. As a result you can immediately track activities of your friends on all the different service they use (like jaiku, … Continue reading Building services like FriendFeed using PHP – Part 1

Water Clogged People in Bangladesh – Let’s help them out!

Hello all, This mail is involves approximately one hundred thousand people, living in a remote place of Jessore named Vobodoho Upazilla. Many of you may already know about this issue. For those who do not know about this, about one hundred thousand people in three villages of Vobodoho Upazilla in Jessore have been water clogged … Continue reading Water Clogged People in Bangladesh – Let’s help them out!