View Single Post
  #3 (permalink)  
Old 10-18-2007, 12:53 AM
TeraTask's Avatar
TeraTask TeraTask is offline
PT Admin
Awards Showcase
Quality Tutorial Quality Tutorial Quality Tutorial 
Total Awards: 3
Join Date: Jun 2007
Location: Reno, NV
Posts: 442
iTrader: (0)
TeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to beholdTeraTask is a splendid one to behold
No try/catch on PHP 4. I don't know what your functions are or what they return, but from what's there, I'd do this:

PHP Code:
//catch the exception that gets thrown if the cookie has an invalid session_key in it
if (!$fb->api_client->users_isAppAdded()) {
  
$fb->redirect($fb->get_add_url());
} else {
  
//this will clear cookies for your application and redirect them to a login prompt
  
$fb->set_user(nullnull);
  
$fb->redirect($appcallbackurl);


Also, given the host thread, I'd suggest getting one of the recommended hosts.

__________________
Jeremy Miller
Content Farmer - Optimized Automated Blog Posting

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote