I am trying to publis开发者_如何学运维h 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?
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.
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
精彩评论