4

I am trying to publish a Facebook post to a users publish stream via a feed dialog in an iPad App.

 [_facebook dialog:@"feed" andParams:params andDelegate:self]; 

When I tap the area to input a message, the keyboard appears and when I tap the box "Say something about this..." the cursor appears. But when I try to type, the input doesn't go to the text field, the cursor becomes invisible and the text field seems to have lost the focus. If I press longer, I am able to write finally.

Strangely this happens only in portrait, but not in landscape. Everything is fine with the post afterwards, only that the users message is missing sometimes. Any ideas?

jscs
  • 63,694
  • 13
  • 151
  • 195
thm
  • 524
  • 1
  • 5
  • 10
  • 1
    I have also experienced this, but I have not resolved it. I always figured it was a Facebook webpage issue (since the form is in a `UIWebView`). Would love to hear an answer to this. – Ben Mosher Aug 26 '11 at 21:13

2 Answers2

3

I had this same problem using version 3.5.2 of the Facebook SDK and iOS 4.3.x and 5.x.

I used the method:

+ (void)presentFeedDialogModallyWithSession:(FBSession *)session
                                 parameters:(NSDictionary *)parameters
                                    handler:(FBWebDialogHandler)handler;

However, now I use:

+ (void)presentDialogModallyWithSession:(FBSession *)session
                                 dialog:(NSString *)dialog
                             parameters:(NSDictionary *)parameters
                                handler:(FBWebDialogHandler)handler
                               delegate:(id<FBWebDialogsDelegate>)delegate;

And implement the delegate method as follows:

- (void)webDialogsWillPresentDialog:(NSString *)dialog
                         parameters:(NSMutableDictionary *)parameters
                            session:(FBSession *)session 
{
    [[[UIApplication sharedApplication].windows objectAtIndex:0] makeKeyAndVisible];
}

This completely solved my problem.

Diego Lima
  • 131
  • 1
  • 4
0

I replicated this on iOS 4.2.1 running on a real iPhone 3G, the auth checks all work but the UIWebView asking for user/pass will not pop the keyboard up to type anything in. Earlier iOS versions on the same device work fine (3.x) and the simulator also works fine in 4.3.x. I hope this helps troubleshooting the problem.

--

This fixed the issue for our app: Facebook iOS SDK Dialog issue Text Input

Joel C
  • 1
  • 1
  • This problem seems to be different, since the keyboard doesn't even show up. Nevertheless I checked the window initialisation and even called [self.window makeKeyAndVisible] explicit again, but without success. Thanks anyway – thm Aug 30 '11 at 15:58