开发者

Facebook dialog Problem in Device,Not Properly Showing in Device

开发者 https://www.devze.com 2023-03-17 10:31 出处:网络
I Successfully Integrate Facebook in 开发者_开发百科my App.Its also working fine on simulator and Iphone,With the dialog box.

I Successfully Integrate Facebook in 开发者_开发百科my App.Its also working fine on simulator and Iphone,With the dialog box.

But when i install facebook official App from Itunes in my Iphone.On share function it will take my App resources to that App.with the following pages.And when I delete Facebook Official App.Its again Works fine.

Facebook dialog Problem in Device,Not Properly Showing in Device

Facebook dialog Problem in Device,Not Properly Showing in Device

Any Solution???? Thanks in advance


Comment out the following lines of code of function

- (void)authorizeWithFBAppAuth:(BOOL)tryFBAppAuth safariAuth:(BOOL)trySafariAuth 

in Facebook.m :

UIDevice *device = [UIDevice currentDevice];
if ([device respondsToSelector:@selector(isMultitaskingSupported)] && [device isMultitaskingSupported]) {
if (tryFBAppAuth) {
  NSString *scheme = kFBAppAuthURLScheme;
  if (_localAppId) {
    scheme = [scheme stringByAppendingString:@"2"];
  }
  NSString *urlPrefix = [NSString stringWithFormat:@"%@://%@", scheme, kFBAppAuthURLPath];
  NSString *fbAppUrl = [FBRequest serializeURL:urlPrefix params:params];
  didOpenOtherApp = [[UIApplication sharedApplication] openURL:[NSURL URLWithString:fbAppUrl]];
}
if (trySafariAuth && !didOpenOtherApp) {
  NSString *nextUrl = [self getOwnBaseUrl];
  [params setValue:nextUrl forKey:@"redirect_uri"];

  NSString *fbAppUrl = [FBRequest serializeURL:loginDialogURL params:params];
  didOpenOtherApp = [[UIApplication sharedApplication] openURL:[NSURL URLWithString:fbAppUrl]];
}
}

This will always show a dialog box to the user.

0

精彩评论

暂无评论...
验证码 换一张
取 消