Wednesday, August 26, 2009

Fix for Facebook authentication on IE

What?
This is for Facebook developers who have faced this problem. If you are using an Facebook application to authenticate a user on a PHP website, the Facebook redirection on Internet Explorer specifically fails the login of the user. This is because the return URL returned by facebook specifically for IE is the appending of the

CallBack URL specified in the Application +
the Next parameter +
a "?" +
the auth_token parameter.


This results in Facebook redirecting to a wierd URL.

the Workaround
for this is to remove the next parameter from the facebook login URL.

http://www.facebook.com/login.php?api_key=<API KEY>&v=1.0&next=http%3A%2F%2Flocalhost%2Ftest%2F%2Ffacebook%3Fredir_domain%3Dexample.com

to
http://www.facebook.com/login.php?api_key=<API KEY>&v=1.0


For PHP websites the changes for the facebook.php are given below:
It must be similar changes for any of the other client API's.
This is accomplished by changing the line on facebook.php
facebook-platform/php/facebook.php

Change the following lines
public function require_login() {
if ($user = $this->get_loggedin_user()) {
return $user;
}
$this->redirect($this->get_login_url(self::current_url(), $this->in_frame())
);
}


to

  public function require_login() {
if ($user = $this->get_loggedin_user()) {
return $user;
}
$this->redirect($this->get_login_url('', $this->in_frame()));
}


The change is to remove the next parameter from the $this->get_login_url Call from within require_login member function of the Facebook class.

This seems to fix the problem of login.
This is not a bug in facebook as it is the intended functionality inside apps.

Happy developing..

Thursday, August 20, 2009

Flash Player BUG: Permission denied to call method Location.toString

Permission denied to call method Location.toString

If you get this wierd error on your error console, it might be because of opening a flash script within a frame from another domain from your domain. This is a flash bug and apparently there is no work around. So just ignore this error.

I found out this the hardway after searching for a long time, so if anyone stumbles upon this page, just upgrade your flash player.

I found it while beta prototyping Kitiyo Stats

Wednesday, August 5, 2009

Google Wave Review & Dev Preview



Google Wave?
Google wave is a new product from Google, it is like but much more than a collaborative chat with bots helping you and adding interactive data within conversations.

It is a developer preview that I got so its kind of slow. The chats are realtime, which means you will have to think really hard before you type it :D . You can add maps, videos, images, or even other websites or anything within a conversation to make it live. Each of these conversation is called a Wave. And each item inside is a Wavelet, Those who have brushed upon their Signal processing subjects would ring a bell here. The waves are recorded in time and can be played back to see the conversation growing.

It takes sometime to load and the javascript pretty much hangs around when we do something like resizing the windows. The pretty new scroll bar is cute.

About bots, you can add bots to your conversation that augments information like if we type some keywords, the bots parse them and fetch the information and populates the conversation for you.

Am still trying it out .. So will keep updated here..
Read on