Take the 2-minute tour ×

I have this method in an external view controller APICallsViewController.m that I want to call when a user touches a button from another view controller MoreInfoCtrl.m. How would I go about doing this?

I've made the import directive in MorInfoViewController.m #import "APICallsViewController.h"

This is for the Facebook API integrating it into an iOS app.

 * Dialog: Request - send to a targeted friend.
- (void)apiDialogRequestsSendTarget:(NSString *)friend {
    currentAPICall = kDialogRequestsSendToTarget;
    NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                   @"Learn how to make your iOS apps social.",  @"message",
                                   friend, @"to",

    HackbookAppDelegate *delegate = (HackbookAppDelegate *)[[UIApplication sharedApplication] delegate];
    [[delegate facebook] dialog:@"apprequests"
    NSLog(@"Request - send to a targeted friend");

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Use NSNotification to add observer and then post notification on that button touch.

share|improve this answer
does that have to come from the app delegate or from the MoreInfoCtrl.m? thanks :) –  hanumanDev May 17 '12 at 9:39
from app delegate. add your observer when u start authorization and in fbdidlogedin postnotification to that method –  Saad May 17 '12 at 9:41

Your Answer


