Junal on the run

Archive for the ‘Facebook’ Category

Day before yesterday night I was watching this movie called “My Fair Lady“, I got to say movie was quite interesting. It had enough fun to hold me but something was distracting me badly, there was live twittering going on, there was live friendfeed going on in real time! Specially, enjoyed the fun comments on American Election 2008. As I was watching the movie on my laptop, I kept the movie player at the right side and the web browser on other side. Time to time I was getting confused which one to watch. “Live web” was that kind of fun so I gave up watching the movie, unfortunately!

We know Facebook “live feed”[please check it out from your FB home page] was launched few days ago, so now we can see the activities of our friends in real time. This is something really interesting, even my friend is not online, I can see what he/she is doing with their profile 😉

Similar thing has brought by Friendfeed and Twitter! Unlike Twitter’s page, which only shows Tweets, FriendFeed’s “real time web” shows you everything that people are doing on the Web. Seems like chat room eh? But hey! You can also comment on these live tweets and friendfeed comment and note that you cannot comment on facebook live feed!

So, where this web is going really? Now, I have something more to keep me in front of my laptop, when im not working and bored I have got something to watch in the web! Isn’t it amazing?? This is not something that is stored somewhere and web page is playing it for me. This is something that is going on in REAL TIME. No doubt, this web world is becoming more AJAX place. It’s becoming interesting day by day…and I just can’t wait to see what’s going to happen in next couple of years…

Lots of things have changed in new Facebook and these changes brought nightmare for developers, especially for existing applications. Old news feed will be deprecated very soon, and all existing apps should use the new news feeds method. Another one is Profile box, in old method it was default but this is no more default in new facebook. Now, users will be asked by an add button to add the profile box. Once users decided to add the profile box they can preview the profile box and clicking on the add button they can add it. So, some extra work for developers no doubt. Let’s see how we can add profile box in new facebook.

I’m taking the example from my personal facebook application FallywoodRead the rest of this entry »

Have a big passion about movie. Especially on making a movie and as a result I have written a movie script! I believe one day it will become a movie through my hand. But I know I have to study on it a lot, for now, all I know how to work on web applications. So, came up with this movie making idea like 2 months ago. I called my friend jewel to get his opinions on it and gladly he liked it! But still we brainstormed on other ideas too, we included 15 university students to give their opinions, had some different ideas but finally we chose the very first one! Me and my friend jewel didn’t look back once we decided to develop this facebook application. So what is this application is all about?

Once you added the application, you become a director of a movie where you can hire your friends to play the key role of your movie. So direct your dream movie on ‘Fallywood’ by casting your friends to play key roles. Or be the next Brad Pitt or Angelina Jolie by being casted in movies directed by your friends! You never know you or your movie might just be the next HIT at the Box Office!

Movie banner from Fallywood

Movie banner from Fallywood

Here are some general roles ….

  • You have a total of $100,000 to make your movie.
  • To cast an actor in your movie costs $1000. An actor’s value increases by 20% every time he/she is hired in a movie.
  • You can become a ‘Top Actor’ if you are hired in the most movies among your friends
  • Your movie can be a HIT at the Box Office depending on how many people have watched your movie
  • Your movie will not make the ‘Top Ranked Movies’ list if it has not been viewed by your friends.
  • A friend can watch your movie several times in one day, but it will only be counted as one view.
  • With each movie invitation sent to a friend, $1000 will be added to your budget!
  • For each invitation sent, you will earn $500. Once a friend has accepted an invitation, you will earn an additional $5,000 for your movie!

Hope you have a good idea now? So let’s add ‘Fallywood’ from here ….. http://apps.new.facebook.com/fallywood/

Enjoy making movie with your friends. Decide who will be hero of your movie, who will be heroin of your movie! And of course make such a way so that your friends watch it! Otherwise It won’t go to the top ranked movie page you know 🙂 wish you all the best for your movie!

We tried our best to make something funny, to entertain people, for that we have sacrificed all weekends of last 2 months! Just to make sure we make something good, but I know an application is never completed, we have plan to extend the features of this application! We need your suggestions here. please let us know what do you think about it, please report us bugs!, we are considering this release as BETA release, so please let us know if you see any problems with the application. We will love to hear from you, we will really appreciate it. Thanks and enjoy!

When I saw the redesigned facebook like few days ago, first thing came in my mind was like “hey, status update is almost like twitter” and then I realized, that facebook would try to take away the popularity of twitter. And today, I saw they also updated the status options in home page which is almost like twitter! Tomorrow I won’t be surprised if I see my facebook IM is showing my friends status message with a pop-ups. Yes, it is just rewinding the same question. “Twitter will be killed by facebook?”

There could be some strong support if I say yes to answer this question.

First of all, they have billion of users. If I can do the same thing with my friends in one place then why would I use twitter? See, now facebook focusing all users status message by making it way larger than before. Their intension is clear.

Status message in my home page, looke like twitter

Status message in my home page, looks like twitter

But,

I don’t think so! Twitter will remain as twitter if they don’t kill their system, if they can figure out how to maintain huge data load.

Why don’t think so, because my twitter friends and facebook friends are not same. I don’t want to share same message/status message with both category. Twitter message is related about what I’m doing, “I’m working on php GD library”. i know this status will be changed after a while in my twitter. But same message with different type of friends in facebook? Uhm …no, I don’t think so.

I’m not worried about twitter!

I have been planning to post a blog on all changes and new features of redesidned facebook ! Thank god, today I got an opportunity to do some RnD on it..and here is the result of all changes and new features. I believe integration of new profile box in MAIN profile is a challenge now. I’m working on it and hopefully, soon I will be able to write another post on how we can integrate new profile box on MAIN profile page ….

  • To use the wide layout (760 pixels) for your canvas pages, you have to enable it in the Facebook Developer application. Edit your application’s settings, then check the Use full canvas width option
  • FB changed the permissions for profile boxes, tabs, and Publisher so they work with require_login as opposed to require_add, since they all have separate confirmations.
  • Parameter name changes for tabs. In the request for the FBML content of a tab, the parameters ‘fb_sig_user’ and ‘fb_sig_session_key’ are now named ‘fb_sig_profile_user’ and ‘fb_sig_profile_session_key’ to distinguish them from other request contexts, where fb_sig_user always represents the logged in user. On a tab, fb_sig_profile_user is the id of the user whose tab is being viewed, and fb_sig_profile_session_key is a special read-only session key on behalf of the tab owner, given so that you can request data for constructing the tab contents.
  • API Calls: For many calls, session keys are now optional. If you continue to pass valid session keys, FB’ll ignore them. FB recommends you remove session keys from the appropriate calls now.
  • User Sessions: During the user preview period, FB will still grant infinite sessions to your Web applications for users on the old profile. However, FB’ll grant temporary sessions to your Web applications for users on the new profile. Temporary sessions last 24 hours, or until the user logs out, whichever comes first. After we launch the profile to all users, we will grant temporary sessions to all Web applications.
  • When the new profile launches in full, only feed.publishUserAction will work to publish Feed stories. So FB recommends you create and register your Feed story templates now and start testing and using that method.
  • Feed Stories. During the user preview period, Feed stories submitted through the APIs will appear on both old and new profiles. The old Feed API calls (feed.publishStoryToUser, feed.publishActionOfUser, and feed.publishTemplatizedAction) will render the appropriate Feed story on the old profile, and render one line stories on the new profile. The new Feed API call (feed.publishUserAction) will work as expected on the new profile, and will render one line Feed stories on the old profile. All Feed stories will be aggregated and shared in News Feed as they are today.
  • Old vs. New Profile: Determining Which Site a User Is Using. We will pass in the fb_sig_in_new_facebook parameter on all pages on the site. Use this to determine whether a given user is using the new profile (true) or the old one (false).
  • Notifications: With the new profile, there will be two types of notifications: general and announcement notifications. General notifications require active user sessions, which use the sending user’s active session (with the same allocation amounts as today).

    Announcement notifications are sent on an application’s behalf. An application can send 7 announcement notifications per user per week when the new profile goes live. This number will fluctuate as allocations change, based on user feedback, like today.

    To account for these changes, we’ve added a type parameter to Notifications.send, which can be set to general or to announcement (the default is general).

  • When a user first interacts with your application, you can call users.getInfo and get a subset of user data (name, profile picture, and so forth). users.getInfo also no longer requires a session key, and if you don’t pass one, you can get the same subset of information.
  • users.getStandardInfo returns more user information (like gender and birthday), and you can use the information from this call to return data for your analytics, for example. You shouldn’t use this call to return information that you want to display to other users.
  • With the new automatic authentication model, we now pass an fb_sig_canvas_user parameter, which sends you the user’s public search listing data (like name, profile picture, friend IDs) when the user interacts with your application for the first time, before the user agrees to your application’s Terms of Use.
  • FB now passes the fb_sig_in_new_facebook parameter to all pages on the site. Use this to determine whether a given user is using the new profile (true) (=1) or the old one (false) (=0).
  • Narrow profile in MAIN PROFILE : The narrow profile boxes on the main profile (Feed, Wall and Info tabs) have the same width as narrow profile boxes (200 pixels) but are limited in height to 250 pixels. You create a narrow profile box for the main profile using the new profile.setFBML API profile_main parameter.

    For more info : http://wiki.developers.facebook.com/index.php/New_Design_Narrow_Boxes

  • Integration Guide for the New Facebook Profile : http://wiki.developers.facebook.com/index.php/New_Design_Integration_Guide#Understanding_the_New_Integration_Points
  • Upgrading your applications: http://wiki.developers.facebook.com/index.php/New_Design_Integration_Guide#Upgrading_your_Applications
  • Registering Templates: New API Methods : http://wiki.developers.facebook.com/index.php/New_Design_Platform_Changes#Registering_Templates:_New_API_Methods
  • Changes to Existing Platform Components: http://wiki.developers.facebook.com/index.php/New_Design_Platform_Changes#Changes_to_Existing_Platform_Components
  • Platform Policy http://wiki.developers.facebook.com/index.php/Platform_Policy#8._Integration_Points
  • Resizable Iframe : http://wiki.developers.facebook.com/index.php/Resizable_IFrame
  • Prompt permission : You can prompt a user to approve the following extended permissions for your application:

. Allowing email to be sent to the user

  • Granting offline access (i.e. an infinite session) for your application
  • Updating user status
  • Uploading and tagging photos
  • Creating and modifying Facebook Marketplace listings
  • Creating and modifying events
  • Setting a user’s RSVP status for an event
  • Sending SMS to the user

for more information :

http://wiki.developers.facebook.com/index.php/Fb:prompt-permission

Before start with Facebook connect lets be familiar with 2 things that are essential to use Facebook Connect APIs.

What is Facebook Connect?

Facebook Connect is the next evolution of Facebook Platform — enabling you to integrate the power of Facebook Platform into your own site.

With Facebook Connect, you can enable your users to:

  • Seamlessly “connect” their Facebook account and information with your site
  • Connect and find their friends who also use your site
  • Share information and actions on your site with their friends on Facebook [from facebook wiki]

What is XFBML ?

Facebook uses XFBML as a way for you to incorporate FBML into your HTML. To see the all supported XFBML tags, please have a look here.

Now, I would like to use Facebook PHP client library to get my all friends in my site !

First of all, lets install an application to get the API key. In my case I named it as “fbconnect-test“. So we got an API and a SECRET key to bring Facebook in my site 🙂

it will be much easier to download given examples source code by facebook developers here. Lets open one HTML file (it could be demo1.htm) then renamed it as demo1.php

now, put your API key here ..

<script type=”text/javascript”>

FB_RequireFeatures([“XFBML”], function()

{

FB.Facebook.init(“YOUR_API_KEY”, “xd_receiver.htm”);

});

</script>

up the file(s) in your server and then run it. You suppose to see a log in button if you used the source code.

Facebook Connect Button

Facebook Connect Button

If you are not logged in Facebook then a log in prompt will appear so that you can insert your log in information. In my case it looks like the following…

Log in form

Log in form

ok once im logged in, I can access my friends list and show them in my site ! So let’s do that for time being …..

we have got API and SECRET KEY right ….

lets up the Facebook PHP client library in the server and then call friends list API to show them in our site..

include_once(‘facebook.php’);

$api_key = ‘API_KEY’;

$secret_key = ‘SECRET_KEY’;

$facebook = new Facebook($api_key, $secret_key);

$array=$facebook->api_client->friends_get();

this $array supposed to return our friends list…lets show our friends picture in our site from the array….

in my case i’m just showing 20 friends …

$count =0;

foreach ($array as $id)

{

$count++;

?>

<div class=”img”>

<fb:profile-pic uid='<?=$id?>’ linked=’true’ size=’square’/>

</div>

<?php

if($count==20)

break;

}

and I have used a simple css class to show thumb image nicely …

.img {

float: left;

padding : 20px 5px 5px 10px;

width:50px;

overflow: visible;

}

have a look at the output ….

Showing 20 friends from my friends list

Showing 20 friends from my friends list

for more please have a look at the following links ……..

http://wiki.developers.facebook.com/index.php/Trying_Out_Facebook_Connect

http://wiki.developers.facebook.com/index.php/XFBML

http://wiki.developers.facebook.com/index.php/Facebook_Connect

Today, I have received technical reviewer copies of CakePHP Application Development that is written by Anupom Syam and Ahsanur Bari. Both of them are my colleagues and it makes me proud to think that they are Bangladeshi! Another great thing is that i was also a technical reviewer of Hasin Hayder’s Learning Facebook Application Development.

CakePHP Aplication Development

CakePHP Aplication Development

Learning Facebook Application Development

Learning Facebook Application Development

Certainly these tasks were challenging for me, but i’m proud to be a part of these books. I want others to read these books. So i’m going to gift 2 books (one CakePHP copy+ one Facebook copy) to IUB library. Dr.Anwar already welcomed me, soon I will meet him to handover these 2 books.