Tuesday, February 28, 2012

fbdidlogin never called...why??

So I have been working on an iOS project recently that needed to implement the Facebook iOS SDK. I was having some major problems getting the delegate function fbdidlogin to fire. I finally realized it was an error on Facebook's part.

In Facebook.m
- (void)authorize:(NSArray *)permissions {
  self.permissions = permissions;
  [self authorizeWithFBAppAuth:YES safariAuth:YES];
}

This code prevents the FB dialog from appearing which successfully calls fbdidlogin. In order to resolve this so that it works properly you must change the third line to:

[self authorizeWithFBAppAuth:NO safariAuth:NO];

This slight code alteration will force the FB dialog to show (instead of the native app or safari app). And you'll see that all works well now. Yay.

Sunday, September 25, 2011

Installing Magento: Notes

Tonight I installed Magento and it took much longer than I expected. Here are some notes to consider the next time:

  1. The following folders MUST be 777 enabled: /var, /app/etc, /media
  2. Even though the Magento website sort of makes it sound like the sample data is optional, IT IS NOT. Make sure you install that first.
  3. If you are installing this on a local device you won't be able to validate the URL. You'll be able to prevent this check on the installation screen.
If you don't follow these rules you might run into the following:

  1. Page Error: The URL "http://www.example.com/magento/" is invalid. Response from server isn't valid.
  2. Page Error: Server Error...It may be down for maintenance or configured incorrectly.
  3. The installation process might hang and the CPU might spike.
  4. You might get the following in your error log: Call to a member function getFrontNameByRoute() on a non-object.
Good luck guys.

Wednesday, April 13, 2011

RPC Over HTTP for Outlook on Windows 7 Using a Self Signed Certificate

So yesterday I was faced with a goofy problem with something I have done a million times before. You see, usually I set up Outlook on laptops to use RPC over HTTP so that I don't have to use VPN to get to a corporate Exchange server. The problem is that I had never done it with Windows 7 yet (things are still kind of stuck in XP land over here). Anyway, the exact methods used on Windows XP weren't working on Windows 7. So here's what ended up working:
  1. Find an XP box and visit the OWA website for your organization (I'm assuming you're using one since I believe RPC over HTTP uses it)
  2. Export the X.509 Cert w/ chain (PEM) version of the certificate using these instructions
  3. Save the certificate somewhere (add a .cer extension if needed)
  4. Transfer the .cer file to the Win7 machine and open it
  5. Click Install Certificate...
  6. Click Next >
  7. Select "Place all certificates in the following store"
  8. Click Browse...
  9. Select the "Trusted Root Certification Authorities"
  10. Click OK and finish the process
  11. RPC over HTTP will now connect where it wouldn't before
Booyeah!

Wednesday, April 6, 2011

Proove.it!

Best image service I've ever used. Super fast. Super easy. Super awesome.



To find out about all the awesome ways you can use proove.it, visit the blog at http://proove-it.blogspot.com.

(Yes, I created this service.)

Tuesday, April 5, 2011

Using a Query String with Segmented Controller/Method URLs in CodeIgniter

CodeIgniter has some awesome segmented URL functionality baked into its core, but sometimes you want to be able to do things like this:

http://my-domain.com/my_controller/my_method?some=more&sweet=stuff

You can do so easily by doing the following:
  1. In config.php change:
    • $config['enable_query_strings'] to TRUE
    • $config['uri_protocol'] to 'PATH_INFO'
  2. In your controller:
    • Fetch the query string using $this->input->get('some');
      (this example corresponds with the above URL)

And that's all folks! It works when a query string isn't present, it works with any number of query string variable pairs, it works with method parameters (e.g. /my_controller/my_method/my_param?some=more). It just works! Sweet, eh?

Tuesday, March 1, 2011

Monday, January 24, 2011

Can't Set Fireworks as Default Application for PNGs

So I use Adobe Fireworks heavily for all my graphical needs. This past weekend I inherited Adobe Creative Suite 4 (I used to have CS3) from a friend. After installing CS4 I uninstalled CS3. From that point on I was unable to have *.PNG files automatically open in Fireworks CS4. Heck, I couldn't even Open As... and have them open in CS4. Finally I found the problem in the Windows registry.

In order to fix this:
  1. Run regedit.exe.
  2. Drill down to HKEY_CURRENT_USER\Software\Classes\Applications\Fireworks.exe\shell\o pen\command.
  3. Update the REG_SZ data to point to the proper path on your machine (i.e. I set mine to "C:\Program Files (x86)\Adobe\Adobe Fireworks CS4\Fireworks.exe" "%1").
  4. Close regedit.
  5. Try associating the file again.
  6. Success.

Wednesday, January 19, 2011

How To: Create a iPhone/iPad Project in FlashDevelop

Download the following:
  1. Packager for iPhone
  2. FlashDevelop
  3. FlashDevelop iPhone Template
  4. FlashDevelop iPad Template (optional) 

Then:

  1. Install FlashDevelop via the installer (select “Install Flex SDK Automatically”)
  2. Copy Packager for iPhone files into C:\{FD_install_path}\Tools\flexsdk\ (copy over existing files)
  3. Copy iPhone/iPad Template files into C:\{FD_install_path}\Projects\ 

Now you can create new iPhone or iPad projects using FlashDevelop! Just use Project > New Project...

Further Tips:

  1. You'll want to make sure that the "Custom Path to Flex SDK" (under Project Properties..." is set to C:\{FD_install_path}\Tools\flexsdk\
  2. Also, each iPhone/iPad project will contain a PackageApplication.bat for building your project for the App Store. Make sure the FLEX_SDK variable is also set to C:\{FD_install_path}\Tools\flexsdk\bin 
  3. Lastly, FlashDevelop has some sweet SourceControl functionality built in. In order to use it you need to enable it in the FlashDevelop settings (press F10). In order to have source control functionality you need to check out the project using TortoiseSVN BEFORE pulling it into FlashDevelop (that's the tricky part). 

Thanks to geo for the awesome FlashDevelop templates!