Monday, December 29, 2008

Facebook Application Part 1

I have been working on development of a facebook app from the last few weeks. I had some initial hiccups initially with trying to figure out where what was and what that does and why and so on.. I found some tutorials on the net, some of them were outdated, some were incomplete.. It seemed complete, but never worked after I did what it asked me to do... Some of the reasons were because of facebook updating their API quite often, some changes in the way the API is used by different code writers and so on... Well, to add to this, I am an amateur web developer and had little programming stints with MySql and PHP. Well it was first hard to figure out what $_POST["name"] does while trying to figure out the bigger picture of getting the app working..

I have wondered always why some of the things are not as straight as they should be always. Well I have found an answer to suit me.. Things are not straight after all.. Where's the fun if everything is straight and what would celebrations mean after something is accomplished. I have been successful in getting the stuff to work after some struggle with each of the different components. I would like to celebrate it with a toast to facebook, PHP, MySql and notepad++... Well Also I would like to contribute this programmer's tutorial of “how to write a facebook app?" Well its targeted at people like me: who wants to get it work, but are struggling to understand a lot of things that are necessary to make it work...

Well, I assume there must be a number of tutorials on the internet out there by now.. How is this different from the rest? Well, for one it’s new and updated to the latest facebook API, and secondly as I mentioned earlier, my target audience is slightly novice and people who want to make things work, but struggling to find the smaller pieces of the huge Jigsaw puzzle. Well for the professionals, there might be some stuff that I might be doing wrong too... You could add to the community by commenting on the right and wrong parts... Third and most importantly, I shall also target my tutorial in helping the people setup a web hosting service for the facebook app. This could be quite a challenge as I faced it myself. Will try to keep it easy read, and detailed, so bear with the stuff you already know...

I will divide the tutorial into 2 parts..

FACEBOOK APP TUTORIAL

Target Platform: Windows OS, Requirements: Text Editor, SSH Connectivity Tool, Web Browser, facebook account, web hosting account, SFTP/FTP Client, Database Admin,
For the starters, download a copy of Notepad++. This will be your editor for editing PHP files. You could simple use the windows notepad too, but only it does not support syntax highlighting, Multi-File View, Brace and Indent Guide, and lot other feature which will help in writing syntax free php scripts. Believe me, you will NEED it.

Now to create an app, first you need to have the facebook developer app in your profile. Login to facebook and add it here. Once you have allowed the app to have access to your profile, you are ready to create your first app...

CREATING YOUR APPLICATION: GETTING THE API KEY

Go into developers and you will need to setup a new application.



After you agree to the terms and conditions of facebook and give it a name, you will see the settings screen for your app. It’s got some important information about your app like the Application ID, API key and Secret... These are the keys used by facebook to authenticate and differentiate your app from others. Keep it a secret.

The URL to return Call is the next thing that needs to be entered. This is the location of the actual web server where you will be adding the files. There are a lot of free hosting services available out there. I used the Solaris based- Joyent FB accelerator. They support Facebook application hosting specifically and are configured to handle the traffic trend for a popular facebook app. Well, What’s more it’s free for the first year.



“Well, just wanted to add here that all the apps used by me are free and mostly open source. If you like to use them, then please be generous in donating to these communities. It takes a lot of hard work to create a free application that ease out some of your daily work load and costs them money. Every bit of your support will encourage us and them to do more for the community. “

WEB HOSTING AND CONFIGURATION

So next step is to create a free account with the Joyent web hosting service. Create using a simple form here. You will need to add the API key in the form. Once created, you will be mailed a list of passwords to your mail id. Don’t get alarmed, I will go through each and every one for your benefit.

You have just got the domain name for your new facebook app which becomes the base for URL to return Call to be entered in the app settings. For now just add the domain name created by the hosting service as the URL to return Call. You will need a SSH connectivity tool like Putty or OpenSSH. I have used the Putty in this tutorial which has whole load of other utilities too.



You will have to configure Putty to access your Shell. Under configuration, Create a hostname as SSHShellUserName@domainName. Select SSH, port 22, and when the port is opened, you will type the password. This terminal has just logged you in as a user on your web server. So you can access the web files here type :

cd /home//web/public

to access the web server directory. This is where all your web files will go into.. Another thing you would need is a SFTP client. I used filezilla client for this purpose and works amazing. You could also use the FireFTP addon for Mozilla.


“I moved from using Mozilla to Chrome recently and am really loving the way chrome looks and feels. The only thing I was not happy with the initial release was the inability to open closed tabs. With this feature, and the fantastic homepage which includes your bookmarks (instead of taking menu space) and the recently visited sites and their thumbnails and of course a list of the recently closed sites. I am falling in love with chrome... “
With filezilla, you need to again create a profile under the site manager and add the SFTPUserName (same as the ShellUserName) and the password also. Under servertype, choose SFTP SSH file transfer type. I chose Putty and Filezilla both to accomplish different operations easily. Putty would help you in passing some specific instruction and listing and grep. You could do it with Filezilla also but more elegant in doing it on the terminal. To increase productivity under advanced tab in the site manager in filezilla, you could specify the default directories to be opened when a connection is successful. Once in, on your right is the web server and you can access the various directories here. Careful while doing anything erratic here, unless you know what you are doing. You could as well see the Public directory of your web server in the explorer type view.
I created a folder under the public folder for the new facebook app. So you might be required to make the modification in the Facebook >> Developer >> App Settings. Change the URL to return Call value from

“DomainName” to “DomainName//”*

*Do not forget to end it with the slash.

Next step is to configure the MySQL for Joyent for which the details can be found here. Its a straight forward process using the combination of Filezilla and Putty.
Joyent has a decent site admin to manage databases, but I prefer phpMyAdmin over the default one. You could download it here and unzip the zipped file and copy it in the public folder. So your structure looks like this


Public >> phpMyAdmin

Documentation regarding the configuration of phpMyAdmin for your site can be found here. This step is required to setup the username and password to access the phpMyAdmin configuration page from the browser.


CREATING YOUR APPLICATION: CONFIGURING YOUR APP


We are nearly there.. Now it’s time to get back to our facebook app. Here just complete the other text fields. I am including some of the confusing ones only. The rest are straight forward.  


BASIC>


  • ICON: Choose an Icon for your app
  • DEVELOPERS: A list of developers who can access the app when in sandbox mode (developmental stage) Careful who you give access to, S/he can access the API Key as well as the Secret if he is a developer.
USER PROFILES>
  • DEFAULT CANVAS: Wide
PAGES>
  • POST Add Redirect URL: Could be the same as the domain URL or in this format http://apps.facebook/
CANVAS>
  • CANVAS Page URL: Include the in here
  • BOOKMARK URL: same as the CANVAS URL
  • RENDER METHOD: Choose FBML as the app I will be describing wil be in FBML. You could later change it to IFrame as and when required
  • CANVAS WIDTH: Full Width (760 px)
ADVANCED>
  • SANDBOX MODE: Enable it during the developmental stage
  • MOBILE INTEGRATION: not needed for this application so DISABLED
  • JavaScript API Library White list Exception: DISABLED for this application
Once the above values have been changed, just save the changes and the configuration is complete….

This is the end of Part 1 . Rest in Part 2

Wednesday, December 17, 2008

4Di Multi-touch @ SingTel iLuminate Photos

Singtel iLuminate 08
This is a collection of photos at the SingTel iLuminate event where we setup a booth (largest and the most sought after) completely sponsered from SingTel.. Well, the queue says it all.. There were people from various interests getting a close up on the largest multi-touch screen in the context to Education.
There was a huge expectaion from a lot of people from this booth, as was set from the previous tradeshow.  Also it costed a lot of money and effort to set-up the enclosure for a booth so big. Well Our design of the enclosure and the booth did come out good with a proper execution from the event management organization. The only problem was even though, the booth was huge, it housed only 5-6 people at a time and there were lots to cater for.. Look at the pics if you dont believe me, We did have a hard time managing the people coming in.. I remember a lady asking me if I could reserve a place for her in the next presentation.. Also there were some high profile visitors who walked in, some Corporate heads, Business Analysts, people from the political scene, Media personnel and the like. 
It was really an achievement for me and my company, Playware.. I should say, Greatness achieved.... Well, We both are now waiting for its pay-off, long-term or short-term.. Well, I am hoping both!
Coming up.. How was it done? 

Tuesday, December 16, 2008

Mulholland Dr.


Some of my old posts.. reproduced!!
The Ladies… Naomi & Laura
Probably one of the most twisty, Rocky Curvy of a movie ever made. A perfect Lynch Serving with some of the hottest scenes placed appropriately.....
This movie will leave you stunned the first time you watch it, not to mention the barrage of unanswered questions that keep haunting you. A movie which requires multiple watchings. Stellar performance from Naomi who just melts into the character. A must watch....
Starts off with a jitterbug followed by the car crash and the intro of the ever lovely Laura... This is just the start of a complete winding and winding of the Mulholland Dr. spell. There is adultery, winky's , blue key, the bum, paint, jewelry, topless lesbian love scenes, depravity, confusion lots of it, depression, illusion, No hay Banda, Silencio, blue box and the list continues.
A fantastic illussion of a promising career, humane help followed by a really innocently placed love scene, unwinding into the bitter reality of decay, death, betrayal, humiliation, Jealousy, hit-man, gun shot and confusion.

Marilyn Monroe, her death explained...


Some of my old posts, reproduced...
Adapted from the article, bonus read “Bomb Shell” by Anthony Summers from the February 2007 issue of the Reader’s Digest.
Marilyn Monroe was a very influential person in the 1960’s. Her Success in the show-biz was not far from the success in her real life. Her real-life acquaintances included a lot of highly influential people during that time. She was famous for a lot of wrong reasons which increased her fan following to highly exorbitant numbers. She became an idol, a goddess for many and opened up a lot of closed doors for a few who wanted to try their luck in the show biz but were afraid to do so. Her constant indulgence in “the prescribed drugs” and “alcohol”, her infamous dalliance with the President of America John F Kennedy, her regular ‘tete-a tete’ with the Attorney General Robert Kennedy, brother of the JFK, her acquaintance with the Communist: Frederick Vanderbilt Field, Great Great Grandson of the railroad tycoon Cornelius Vanderbilt all laid the foundation for a well decorated and a very graphic death of Marilyn Monroe.
Marilyn Monroe died on the 5th of August, 1962. She was found naked, in a semi-foetal state, face unmade-up, messed up hair, and a disordered room.
Theodore curphey at the center
The documents relating to the investigations of her death as reported by the then Coroner Theodore Curphey was not released in full until a far later date. The District Attorney (DA) opened up the case again in 1982 and ordered a formal review of the death of Marilyn Monroe. FBI marked the withheld documents as ‘B1’ – an exemption covering matters of national security and made it unavailable for the review. These were the document concerning Monroe’s visit to Mexico. Because of a momentous effort of Anthony Summers, who bought suit against FBI to release the ‘105’ file and due to his pressing and pressurizing the FBI through his lawyers, it released 100 pages with not much of censorship. The Marilyn Monroe’s July 26th Document which was made available only the previous year was written only 10 days prior to her death. This along with the 500 page report of the DA’s review threw a new light on one of the most enduring mysteries of the 20th Century.
Not long before she died, her friend Jeanne Carmen remembers Monroe discussing suicide with her. She wanted to dress in white, sleep on white sheets and mattresses, in an ordered bedroom, and take an overdose of the prescribed medication. But what came to picture was not such a beautiful scene, but an extremely graphic and ugly scene of her death. She was jointly discovered by her housekeeper Eunice Murray and Monroe’s Psychiatrist Dr. Ralph Greenson. Mrs. Murray called Dr. Greenson when she suspected something is wrong in the bedroom apartment of Monroe. Dr. Greenson who was dead by 1982 supposedly broke a window, and entered her room and found her unresponsive and then called the internist Dr. Hyman Engelberg, who declared her dead and sent her body for autopsy. The Coroner Theodore Curphey had put in the reports that the cause of death was self administered overdose; very specifically “in one gulp”.
Dr. Thomas Noguchi
The autopsy Surgeon Dr. Thomas Noguchi after the examination circled “Suicide” as the cause of death and finally after some final investigations added the word "Probable". There were some strange flaws during the autopsy process itself. When the Toxicologist Dr. Raymond Abernethy was asked to test the tissue samples, he had reportedly destroyed the samples. Retired Assistant Medical Examiner of San Fransisco Dr. Steven Karch comments on this particular case as a total irresponsible behavior of the head-toxicologist. He says “To throw away the tissue is, I think astonishingly damning. There is no justification because you never know when you might want to go back and look again" During the investigation, Dr. Abernethy did not comment about the destruction of evidence. Dr. Karch brought forth another flaw in the investigation. According to Coroner Theodore’s report nothing was removed from the bed scene, but according to the investigative reports, the coroner’s laboratory analyzed eight medication containers. However Dr. Karch pointed out that only one drug was prescribed by the internist to Monroe which had killed her. Dr. Karch asks”where did the others come from?” also when Inez Melson, Monroe’s Business Manager first entered the apartment, after her ceremony she found the bottles of medication along the bedside which were simply thrown away. So another question arises - What was analyzed in the coroner’s labs? Dr. Karch adds "You cant rule out the possibility that Monroe was murdered. I would classify this death as Undetermined Causes. By nature I am not a conspiracy theorist but the circumstances of her death remain a mystery”.
Sgt. Jack Clemmons
The initial investigations of the death were performed by the Police Officer Sgt. Jack Clemmons. During the DA’s review, he was interviewed and seemed to have said the bed scene had not looked “kosher” to him and also declared that the housekeeper’s version was inadequately investigated. He was not given any weight age by the DA due to his lack of proper investigative experience during his investigations. He was succeeded by Police Officer Robert Byron. He too has seemed to have strongly suspected the housekeeper's veracity. But he was surprisingly not investigated by the DA during their review in 1982. But under a private interview, he revealed that probably Mrs. Murray's descriptions were rehearsed and a lot of things were hidden by both the internist, Dr. Engelberg and Monroe’s Attorney Milton Rudin. The lawyer probably told Mrs. Murray "Don’t say anything" Lot more could have been reveled especially the correct time and situation was never reveled completely. When the Coroner Theodore was approached by the DA for an interview, He refused to Cooperate. He said "I’ll be goddammed if I'll get involved".
The District Attorney opened up the possibility of "Murder" and "Victim Marilyn Monroe" in 1982 but closed the review within 4 months citing "No credible evidence supporting a murder theory Possibility of an accident but suicide more likely” It did not even question the credibility of the principal witnesses, neither question the destruction of forensic specimen but essentially rubber stamped the original findings.
During an interview with the widow of Monroe’s Spokesman: Natalie Jacobs, she had revealed the time of the news of Monroe’s death came when they were at a Henry Mancini Concert before 11pm. But according to the official reports, the housekeeper claimed that Monroe was found dead at 3:30am. Former employee of Jacobs, Juliet Roswell supported these statements that the news of death came before 11pm. However during the sixth interview with Anthony Summers, the 83 old Mrs. Murray told in an interview for a BBC Documentary "Why at my age, do I have to cover this thing?" causing a breakout leading to the protection of Bobby Kennedy by his own protectors. Monroe’s Spokesman Arthur Jacobs was called immediately after the discovery of death for urgent damage control. Michael Selsman, an employee of Jacob’s remembers that he was ordered to give out as less information possible especially about the link with Kennedy’s. This could have caused immense political fallout. When the Photojournalist William Woodfield, interviewed Dr. Greenson on the phone and taped it, the tape being still available something shocking resulted. Dr. Greenson ends the call with an outburst "I can’t explain or defend myself without revealing things I don’t want to reveal. Its a terrible position to be in to say I cant talk about it. I just can’t tell the whole story ... Talk to Robert Kennedy."
Monroe’s attachment and affinity towards powerful men was never a secret. The DA’s Review headed by former Assistant District Attorney Ronald Carroll, declared that probing into her involvement with the Kennedy's was not his job but of biographers and historians and washed his hands clean. He also had no clue why Byron was missed out on the investigations. Also another point worth mentioning here is about no action being taken on the Coroner’s non cooperation with the DA.
Marilyn Monroe’s links with the John F Kennedy extended previous to the Presidential Elections. But however her tete-a tete Attorney General Robert Kennedy got them more close to each other. She used to get a prepared list of political talking points which was discussed at length during her first meetings with him at the Santa Monica home. She used to identify him as the "new man in my life”, "The General" (which was taken forward by the Justice Dept. insiders to refer to him) and "prominent public figure". This led to exchanging phone calls, and his occasional visits to her house in California as confirmed by Robert’s secretary Angie Novello, and FBI's former LA agent-in-charge Bill Simon who occasionally lent his convertible Cadillac to Robert "to go see Marilyn".
During the DA's review, initial reports suggested that Robert was in San Francisco (100 Km away) during her death, but further enquiry with Daryl Gates, an aide to the LA Police chief led to Robert indeed making a trip to LA. This was confirmed by John Dickey, a Deputy DA in LA (1962) and further substantiated positively by Ward Wood, a Lawford neighbor who saw Robert Kennedy arriving early evening before the night of her death.
Marilyn Monroe with José Bolaňos behind
Just before her death, Marilyn made several phone calls, but two of them were very significant. Sometime after 9pm she called José Bolaňos, scriptwriter in Mexico. During his interviews all he said revealed was "something that will one day shock the whole world" but never elaborated on it. The second important call was after 9:30pm to Sydney Guilaroff, doyen of Hollywood hairdressers and a confidant of several stars. He initially refused to comment on the phone call, but before his death in 1997, wrote in his memoir that Monroe sounded “frantic”. She had told him that“Robert Kennedy was here, threatening me, yelling at me...I'm having an affair with him... I had an affair with JFK as well" She said
DVD Cover
Robert Kennedy had journeyed to LA not to merely break off with her but to warn her about ever phoning the white house again. “It's Over". Sobbing on the phone, she said, I'm frightened... I know a lot of secrets about what has gone on in Washington... dangerous ones."
Hammer and Sickle
She used to maintain a Journal concerning conversations with Robert Kennedy on subjects such as his crusade against Mafia, his efforts to put teamster leader Jimmy Hoffa behind bars, and confrontations with Fidel Castro's Cuba. Her habit of writing was recalled by no fewer than seven people including her friends such as Jeanne Carmen. As recalled by Carmen, When Robert Kennedy discovered the diary; he became upset and told that she should not put anything in writing and ordered her to throw it away. But however she does not know about the whereabouts of the diary from then on.
Monroe with the Kennedy’s
During her February 1962’s visit to Mexico, Many things happened along with the 10 days of shopping, socializing and drinking too much. The other things that were actually important were documented in the FBI confidential files. In the 80’s these were a closed book even to the DA. These were released last year with the valiant effort of Anthony Summers and his Advocates. According to the report sent to the Director J. Edgar Hoover, she was having a meeting with "The Communist" Two unnamed people had become close to her. They were the members of the American Communist Group in Mexico... also closely related to the Communist Party, USA. They shared a common sympathy for communism and the Soviet Union... The document also highlighted her growing mutual infatuation with Frederick Vanderbilt Field. Sources reveled that she was completely enamored with him as he was rich, stable, intellectual and dependable. During his interviews, as Field was married, he made no mention anywhere about having a fling with her. However his impression of her was "Sexually, she did a fair amount of one night stands" Field had long espoused Communist doctrine and deemed Monroe's Politics "excellent". Monroe’s Psychiatrist’s daughter Joan Greenson described Monroe as "passionate about equal rights, rights for blacks, rights for the poor. Identified strongly with the workers." She was surrounded by Communists. Her psychiatrist Dr. Ralph Greenson and her internist Dr. Hyman Engelberg both were strong communists and were involved with the communist party. FBI document deemed her to be “very positively and concisely leftist” Her housekeeper’s Brother-in-law, Churchill Murray was Involved with the Communist Party and was the one who introduced her to the diplomats in Mexico.
In Mexico, She debated the US policy on Cuba with José Bolaňos and Field. These were some of the most Sensitive issue during the early 1962. The Cuban Missile Crisis was months away and Robert Kennedy was directing secret American attempts to overthrow Castro. Her knowledge however vague or meager would have been of great interest to the Cubans and the Soviets. Some members of the American Communists in Mexico were known to be in touch with the Soviet-bloc embassies. Was she an agent without her greatest of knowledge?? On the 22nd March, the President John F Kennedy was warned by J. Edgar Hoover after he received a FBI document about Monroe's visit to Mexico. He warned him about his womanizing. But JFK slept with Monroe two days later during a weekend break!!
Her contact with the Kennedy Brothers continued along with telephonic conversations with Field. Field was said to have used her Manhattan apartment when he was on visit that summer. He was continuously tracked by FBI agents wherever he went.

Time line
Bombshell Report received by J. Edgar Hoover on July 13th reported Monroe’s Luncheon with the Kennedy's and her socially significant questioning concerning the morality of atomic testing. This was just after the testing of the H Bomb witnessed by Robert Kennedy and the Chairman of the Joint Chiefs at his side. Anything Monroe passed on about the Testing would be of great interest to the communist side. No records revel Hoover's warning to the Kennedy brothers. But her sudden Death, just three weeks later revel why the Kennedy's moved to sever their connection with Monroe once and for all.
Newspaper Headlines on the next day
According to the psychiatrist Dr. Ralph Greenson, when found dead, she had a phone "clutched fiercely on her right hand" Investigation reveled a piece of crumpled paper on which the White house phone number was scrawled. Detailed investigation reveled that she had called the White House, JFK but in vain as JFK was out of town enjoying a break. Presidential phone log showed that he received a call from Peter Lawford in California. The two men talked for sometime.
Robert Kennedy was back at a friend's Ranch. On the news of her death the host remembered the discussion was"lightly in a sort of amusing way"