Thursday, February 16, 2012

Adding Your Tab Application to Your Facebook Page

Problem:
I keep forgetting this simple instruction and have to go look for it.

Solution:
I post it here:


https://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID&next=YOUR_URL


where YOUR_APP_ID and YOUR_URL can be found in your app settings.

Source: https://developers.facebook.com/docs/appsonfacebook/pagetabs/

Monday, February 13, 2012

Upgrading Flash Builder 4.5 to Flash Builder 4.6

Problem:
Interested in using many of the cool new features in Flash Builder 4.6 including native extensions, I was anxious to install 4.6 and get started. I purchased CS5.5 last year and Flash Builder 4.5 came as part of that suite. I completely uninstalled Flash Builder 4.5 from my system (see below) and went to install FB 4.6. When I entered in my CS5.5 serial number the program said it was invalid and wouldn't except it. With frustration, I contacted Adobe support to ensure that I was in fact supposed to be able to install this FREE update. Which they replied that is of course was.

Solution:
After searching online I found a thread in the Adobe support forums with all the answers I needed. In short, you install FB 4.6 and choose trial mode (for installs where FB was part of the suite only, see below for standalone updates) and after FB 4.6 would detect the licence and appear registered.

Note: FB 4.6 required a complete re-install of the application due to many changed included with this update. More information here.

Installation Instructions (for standalone and Creative Suite versions of Flash Builder)
Begin by uninstalling the version of Flash Builder on your computer.

On Windows, navigate to Control Panel and choose to Uninstall a program (Windows 7) or Add/Remove Programs (Windows Vista).

For Standalone installations
Find Flash Builder 4.5 in your program list and proceed to uninstall it. When given uninstall options, choose both Flash Builder 4.5 and AIR for Apple IOS Support.

For FB installed with Creative Suite
Select the Creative Suite and proceed to uninstall. The uninstallation program will now display a list of all the programs which have been installed with the Adobe suite. Select Flash Builder 4.5 and  AIR for Apple IOS Support  and uncheck all other programs. Continue to uninstall them from your computer.

Install Flash Builder 4.6
You may need to download the 4.6 program by going to https://www.adobe.com/cfusion/tdrc/index.cfm?product=flash_builder and choosing the appropriate version for your computer. Once you have downloaded the program continue to install it as normal. When prompted for a serial number, do the following:

Note: Some users have specified that they run into an error while installing FB 4.6 that stated:
A conflicting or prerelease version of Adobe Flash Builder exists on this computer. The conflicting version must be removed before installing from the current media.
If you get this error while installing FB 4.6, you will need to download the Adobe Cleaner which will remove additional files related to the issue. Be sure to only select the program Flash Builder before cleaning. It is also recommended by some users to completely reboot your computer after running the Adobe Cleaner and prior to installing Flash Builder 4.6

For Users who had previously installed Flash Builder 4.5 standalone
You will now need to enter the same serial number you used when you installed Flash Builder 4.5. If you have lost this or have trouble getting that serial number to work. Contact Adobe for technical support.

For Users who had previously installed Flash Builder 4.5 as part of a Creative Suite
You will now choose the trial mode and continue with the installation.

On start-up, Flash Builder 4.6 should start properly without any indication of being in trial mode as it should have now detected the previous licence used for Flash Builder 4.5.

If you continue to have issues, or the install does not work properly, contact Adobe Technical Support.


Wednesday, February 8, 2012

CodeIgniter 2.1.0 Facebook App: Wont Load in Facebook

Problem:
One of my clients currently has me working on a project involving the creation of a Facebook application. Since the project is small and needs to be completed ASAP, I chose a small light PHP framework for quick development which was CodeIngiter. Once I got my test application written I tested it on both the absolute URL and within Facebook. It worked fine by direct URL but when I attempted to load it on Facebook, it would give me the standard issue.

Solution:
When I set up my application, I went through and turned on all the usual configurations I thought might be helpful for this project without thinking much about it. Turned out one of these configurations prevented the application from loading inside Facebook, just like it should. If you haven't figured it out yet, it is the CSRF protection. When CSRF protection is turned on, a token is required when submitting POST data to a URL, this token is a randomly generated and provides security so another website can't submit data to your page in an attempt to exploit a user.

Once this was disabled, the application rendered as expected within Facebook.

Further More:
Because CSRF is important for web development to protect your users, would suggest implementing something similar to the method given on Facebook Authentication API page about half way down the page.

Friday, February 3, 2012

DreamHost: PHP generates XML without quotes and case insensative

Problem
Running a Twilio application on my personal server was working fine until I moved it to DreamHost. At that point my XML was corrupt and closer inspection showed that double-quotations we're missing and the XML tags case-sensitivity was not preserved. Initially I examined both setups knowing that it must have been a configuration issue. I verified that short_tags were turned off. But the problem continued.

Solution
When setting up this specific domain on DreamHost, I had checked to use page speed optimization (Beta). Knowing about Google's page speed efforts, I assumed measured had been taken and this had an issue with XML rendering the issues I mentioned above. I turned off page speed optimization on that domain through the DreamHost control panel and gave it about 10 minutes for everything to actually switch over. I tested the result again and found it to be exactly as expected.