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 🙂