Facebook Error Message: next is not owned by the application

After creating a Facebook application for the first time, you might find that the Sample Code they provide doesn't work. You get the following error message upon trying to use the login button (fb:login-button):

API Error Code: 100
API Error Description: Invalid parameter
Error Message: next is not owned by the application.

To fix this, go to the Facebook Application Settings > Canvas page and make sure you enter a Post-Authorize Redirect URL.

Once you do this, go ahead an visit your sample page again after a few minutes and it should work fine.