Search code examples
iphoneios4xcode4fbconnect

getting blank FBPermission Dialog in iphone app


I successfully integrate the face-book API and able to get all user profile but the problem is the value i am getting without permission dialog. In place of permission dialog i am getting blank white dialog without any content or any buttons.I am using FBConnect. I Done with this code i stuck from last many days because i am not able to find the reason also i tried google to get solution but not get success.

My code is here to display dialog.

`-(void)askPermission:(id)target{
FBPermissionDialog* dialog = [[[FBPermissionDialog alloc] init] 
                                  autorelease];
    //dialog.permission = [NSString stringWithString: @"user_birthday,user_interests"]; 
    dialog.delegate = self;
    dialog.permission = @"user_interests,user_birthday";
    [dialog show]; 
}`

in FBPermissionDialog.m 

-(BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request
    navigationType:(UIWebViewNavigationType)navigationType {
//  if (_permission = [NSString stringWithFormat:@"user_interests"]);
// {
//    NSURL* url = request.URL;
//    if ([url.scheme isEqualToString:@"fbconnect"]) {
//      if ([url.resourceSpecifier isEqualToString:@"success"]) {
//        [self redirectToLogin];
//        return NO;
//      }
//}

  return [super webView:webView shouldStartLoadWithRequest:request navigationType:navigationType];
}



    -(void)dialogDidSucceed:(FBDialog*)dialog {
        NSString* fql = [NSString stringWithFormat:
                         @"select name, first_name, last_name, hometown_location, sex, pic_square, current_location, interests, birthday_date , activities, tv, movies, music, books from user where uid == %lld", _session.uid];
        NSLog(@"%@",fql);
        NSDictionary* params = [NSDictionary dictionaryWithObject:fql forKey:@"query"];
        NSLog(@"%@",params);
        [[FBRequest requestWithDelegate:self] call:@"facebook.fql.query" params:params];


    }

Please help me i don't know why i didn't get the permission Dialog and getting blank screen .Any help will be appreciated. Thank You


Solution

  • meaning you are not getting the login credential dialogue. Is there any dialog appearing BUT its blank? If yes please make sure you have the latest Facebook for IOS sdk downloaded please :) Link : https://github.com/facebook/facebook-ios-sdk