Facebook recently updated their Graph API to require an oAuth access token. Here is a quick guide that explains the easiest way to create an access token for your site.
Archive for the ‘Quick Tips’ Category
Simple jQuery script to automatically open external links in new window
Often times on sites it's useful to automatically have any external link open in a new window. This is a very simple solution that just overrides any link that starts with http:// or https:// and forces them to open in a new window. There are obviously other ways to accomplish this but this is the most simple method. This method consists of a simple jQuery function and forces external links to open in a new window. This is useful for any site with unpredictable content when you know you want external links to open in a new window.
Flush DNS cache
Most (if not all) modern operating systems keep a local DNS cache some are pretty good at keeping them updated some aren't. Either way from time to time when making DNS changes it is useful to know how to clear your DNS cache. This is just a quick reference of how to clear DNS cache on several popular operating systems.
VirtualBox Error: has 1 differencing child hard disks
Recently I went to start up my VirtualBox Windows 7 client and I got the following error:
"Hard disk '____.vdi' with UUID {___} cannot be directly attached to the virtual machine 'Windows7′ ('___.xml') because it has 1 differencing child hard disks."
I have no idea what 'caused this error and it took me a lot of searching to find a good solution to it. Since it took me so long to figure out I decided I would post the solution here for my own reference and hopefully to help anyone else that faces the same issue.
quick php get post request isset function
When checking the values of $_GET / $_POST / $_REQUEST it is often necessary to check them with isset to ensure that they are defined to avoid undefined index warnings. Here are 3 VERY simple functions that every programmer can use to avoid ever running in to these problems.
Rebuild Plesk Apache httpd.conf configuration file
Whenever you manually make changes on a server running plesk that will effect your httpd.conf Apache configuration file you have to tell plesk to rebuild the httpd.conf file. Luckily it is very easy to tell plesk to rebuild httpd.conf
PHP isset vs empty
A very common mistake when first getting in to PHP is to think that isset() and empty() can be used as each others inverse. This is VERY far from the truth and can cause major problems in an application. In this quick article I will explore the differences between isset and empty in PHP
WordPress upgrade Call to a member function add_rewrite_tag() on a non-object
This is just a quick post for anyone who got the following error (as I did on a couple sites) when upgrading WordPress to 3.0+
Fatal error: Call to a member function add_rewrite_tag() on a non-object in … /wp-includes/taxonomy.php on line 289
Easiest way to get the latest status from facebook fan pages in PHP
So, quite often companies what to show their latest post from their facebook fan page on their website. This should be really simple right. Well it is. However, it seems like most of the world wants to REALLY over complicate it. I searched for this forever and people didn't seem to understand: I don't want facebook connect. I don't need to log in a user. I shouldn't need to load the facebook sdk. I shouldn't need to create a facebook app. There has to be a better way. I thought to myself it's SUPER easy on twitter there has to be something similar for facebook and of course there is.
Load latest twitter tweet in 1 line of PHP code
If all you're looking to do is load your latest tweet in the simplest way possible this is the function you need. Luckily Twitter formats all of the latest posts into simple RSS feeds which makes it SUPER easy to just go and get them. It honestly doesn't get any easier than this. Read the rest of this entry »