问题
When a user gets to this screen, there is no way to cancel out of it. What can I do?
To get this view in the first place I am running:
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
vid, @"link",
vid, @"source",
vid, @"picture",
@"My Place", @"name",
@"YouTube Presentation", @"caption",
title, @"description",
@"Enjoy this Video", @"message",
nil];
[app.facebook dialog:@"stream.publish"
andParams:params
andDelegate:self];
回答1:
This happens if your FBDialog.bundle is not part of your resources.
To fix this you have to:
- click on your app in the Project navigor (the folder button - top left)
- select your target
- select Build Phases
- Under "Copy Bundle Resources" you need to hit the little + button
- select "Add Other..."
- Find your
FBDialog.bundleand add it to your project.
I hope this saves you the trouble it's given me!
回答2:
If you use FacebookSDK 3.1.1 all you you have to do is only to add the file named "FacebookSDKResources.bundle" to the xCode Project Navigator (you can put this next to the FacebookSDK.framework).
You can find it inside FacebookSDK.framework->Version->A->Resources
This solution is fully functional on iOS 5 and 6.
Simple!
回答3:
This is how mine looks, you should have a close button on the top right. You must be doing something wrong when you display it.
@property(nonatomic, retain) Facebook *faceBookObject;
…
// Authentication
- (BOOL)isLoggedIn {
if (!self.faceBookObject) {
return NO;
} else {
if ([self.faceBookObject isSessionValid]) {
return YES;
}
}
return NO;
}
…
if (![self isLoggedIn]) {
[self login];
}
- (void)login {
NSArray *permissions = [NSArray arrayWithObjects:@"read_stream", @"publish_stream", @"offline_access", nil];
[self.faceBookObject authorize:permissions delegate:self];
}
来源:https://stackoverflow.com/questions/11247222/ios-how-can-user-cancel-facebook-sign-in