Categories
Personal

It’s not everyday you turn 21 !

Yeah, finally it comes — I am a man of 21 at last… Wishing another happy birthday to myself… I regret approaching one more year to my death as well…

I can’t express how I feel today. Certainly elated to some extent. But joy is not the total scene today. I come to think about the last year. It was unnaturally eventful in my whole lifetime. Earlier, I moved to Dhaka for attending Engineering coaching at Omeca. I had to leave behind the usual life I was used to here in Khulna. It was a pain leaving my parents and younger brother. And the worst thing was I couldn’t persuade my parents to take my PC with me. I went on to Dhaka. I used to live in Mirpur 10, in Senpara.

I was having peaceful life. I used to ride Volvo to get to Farmgate and then walk to Omeca’s 5th floor. I met Palash there. He was then a moderator at http://jotil21.net , my little mobile comunity site. We had contact online but never met face to face. But now I saw him in real. It was great to have him by side. I also met new pals there. First Laxman and then Sunny was very close to me.

Life was passing by. Soon after, came my HSC result. Got 4.80 spoiling my reputation as a brilliant student. I was studying for engineering and I had GP of 18 in English, Physics, Chemistry and Math. I was a bit frustrated. I was being scolded every now and then by my dad. Life became hell for me. I still had hope for BUET since the previous year, BUET took score of 18 in that 4 subjects. I was now studying harder than ever given that I knew it was my fault I did bad in the HSC. It was my negligence that has made me pay for it. Time grew close and soon I had the sad news — BUET chose 18.5 this year and my hope for BUET was lost. Following the same track, I couldn’t appear at admission tests for KUET, RUET or even CUET.

I was hopeless. The pressure was growing on me. My dad was going insane. I applied for admission in DU, SUST, PUST and of course KU. I got chance in DU but the I failed to get the level of score in math which was required for DU CSE. So SUST and others were my last hopes.

These days, I was going through loads of pain. In the end, I got chance in SUST. I got CSE. I was much relieved. But another accident struck me. I got potassium deficiency and suddenly I lost control on my muscles. I could not move or do anything.

I was going to admit myself into SUST when it all happened. I was taken to Islami Bank Hospital immediately and I was saved. It was a bit odd. I remained alive occurring some sort of medical miracle. I had 1 mol/ml potassium less in my blood serum than the required level. My heart was supposed to have been stopped by then. But it was alright at last and I managed to get admitted into SUST as well. I was carried to Sylhet on a rent a car accompanied by around 7 or 8 of my relatives mostly uncles. 😀

I was glad I was alive. My dad though insisted on my going to SUST, I could sense his restlessness inside. So I decided to stay at KU. I sat for admission in all the schools except Sociology and economics. And I got chances in all of them as well. I chose BBA without hesitation.

Life was passing by and I had a very nice time with my new mates. Though my old friends segregated into different places, I miss them all the same. I am happy that I could find some really cool friends at KU. They have been always by my side. I have had all sorts of support and affection from them.

It’s my friends who are arranging a party at KU tomorrow… It’s Ramadan, I know but we can share some fun… have some chat and enjoy some real moments out there… what’s the need for a feast ? 😉

Well, it’s not everyday a man turns 21, I am glad that my being 21 has brought some fun for my friends as well… 🙂

Love you friends… !!

Categories
PHP

Fun with Twitter OAuth: The Source Code

In my previous post, I mentioned about the twitter OAuth app hosted at: https://masnun.com/twitter-app/ . Here it comes, the source code.

I am not going to include the Twitter OAuth Library source. You have to download it from Github. The link is available in my previous post.

consumer.php

index.php

return.php

Notes On OAuth:
First we, construct the twitter object with the consumer details.
Then we ask for a request token. We build the authorization url with this token.
We send the user to the auth URL.
When the user returns, again construct a twitter object with consumer details and the request token we retrieved previously.
Now that the user is authorized, we ask for access tokens.
We have the access tokens now, so build a new twitter object that has full access to the API.

Now, we can make API calls.

The steps may seem a bit odd at first look. Just go through a couple of times and you’ll get it clearly.

Enjoy OAuthentication, Enjoy Twitter enginnering !!

Categories
PHP

Facebook Integration to Mobile Web App

I feel so happy today — at this very moment ! I have been finally able to integrate Facebook into my mobile site — http://jotil21.net. It’s been a mobile community site running on the J21Community software I wrote back at my college life.

I have been thinking of adding some sort of social interaction to it for a long time but never I got that much time. Today afternoon, I felt a dashing urge to do something with the facebook developers API. I started learning the basics of the API and soon gathered adequate knowledge to start writing an app. But I couldn’t come up with a good idea to implement. So I chose to integrate facebook with my mobile site.

First of all, I went through the R&D to find out which API calls I might need. Hopefully, there were only a few those would be required for what I wanted to do. So I registered a new app and fired off into coding.

The design is very simple. The app would collect the user’s unique facebook user ID and store in my database against a JOTIL21 username. You have to perform this linking action using your J21 ID and Password. Once your credentials are verified, your unique facebook id is stored into my database and linked with the corresponding J21 ID.

Now, to let J21 update your status for you, you need to allow special “extended permission”. So after successful link up, you’re provided with an URL to authorize that bit. Now, you’re totally done.

For this I used the official php5 facebook client library and used iframe as the default rendering method. The client uses an user’s unique facebook ID to to update his status using the $facebook->users_setStatus(“Status”,”Facebook_User_ID”) method.

It was really cool but looks like I am forgetting WML coding these days. Had to mess up a lot with the syntax. But finally, it’s running fine. It’s still in a beta mode, just a proof-of-concept that WML apps can have facebook connection as well.

Well, enough of that today. Gotta go for Iftari… Hope to write more on these topics really soon 🙂