当我向用户显示提要对话框时,我遇到了一个小问题,对话框的“通过 [APP NAME]”部分旁边显示了一个问号。
我不确定这是否是我的错误,或者这只是 Facebook 显示对话框的方式。我的显示代码如下:
- (bool) PostToWallWithDialog:(NSString*)a_pMessage
{
NSMutableDictionary *params = [self GetParams];
// Invoke the dialog
[FBWebDialogs presentFeedDialogModallyWithSession:nil
parameters:params
handler:
^(FBWebDialogResult result, NSURL *resultURL, NSError *error) {
if (error) {
// Error launching the dialog or publishing a story.
NSLog(@"Error publishing story.");
} else {
if (result == FBWebDialogResultDialogNotCompleted) {
// User clicked the "x" icon
NSLog(@"User canceled story publishing.");
} else {
// Handle the publish feed callback
NSDictionary *urlParams = [self ParseURLParams:[resultURL query]];
if (![urlParams valueForKey:@"post_id"]) {
// User clicked the Cancel button
NSLog(@"User canceled story publishing.");
} else {
// User clicked the Share button
NSString *msg = [NSString stringWithFormat:
@"Posted story, id: %@",
[urlParams valueForKey:@"post_id"]];
NSLog(@"%@", msg);
// Show the result in an alert
[[[UIAlertView alloc] initWithTitle:@"Result"
message:msg
delegate:nil
cancelButtonTitle:@"OK!"
otherButtonTitles:nil]
show];
}
}
}
}];
return true;
}
- (NSMutableDictionary*) GetParams
{
// TODO: Externalize these strings
return [NSMutableDictionary dictionaryWithObjectsAndKeys:
@"App Name", @"name",
@"Caption goes here!", @"caption",
@"Description goes here!", @"description",
@"http://example.org", @"link",
@"https://upload.wikimedia.org/wikipedia/commons/7/70/Example.png", @"picture",
nil];
}
有什么办法让那个图像消失吗?