title: How refer to variable in ViewController from AppDelegate?
body: <p>I have a facebook variable in my ViewController that I want to refer to in my AppDelegate method.  How do I do this?  </p>
  
  <p>In my AppDelegate I want to put this, since it uses UIApplication and all other refs are in this class:</p>
  
  <pre><code>    // For iOS 4.2+ support
      - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
        sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
          return [facebook handleOpenURL:url]; 
      }
  </code></pre>
  
  <p>The facebook variable is in my ViewController .h file:</p>
  
  <pre><code>    #import &lt;UIKit/UIKit.h&gt;
      #import "FBConnect.h"
  
      @interface ImportPicViewController : UIViewController &lt;FBSessionDelegate, FBDialogDelegate&gt;{
          Facebook *facebook;
      }
      @property (nonatomic, retain) Facebook *facebook;
      @end
  </code></pre>
  
  <p>and synthesized in the .m file:</p>
  
  <pre><code>    @implementation ImportPicViewController
      @synthesize facebook;
  </code></pre>
  
  <p>But it is alloc init in the ViewController:</p>
  
  <pre><code>    - (void)viewDidLoad
      {
          [super viewDidLoad];
          facebook = [[Facebook alloc] initWithAppId:@"224207854355440" andDelegate:self];
  </code></pre>
  
  <p>Any idea?</p>