Диалог facebook не запускается из обработчика виджетов. Но диалоговое окно facebook запускает OK с кнопки.iPhone: невозможно открыть диалоговое окно facebook из окна предупреждения
код запуска диалога facebook следит за
- (void) share_on_facebook
{
_facebook = [[Facebook alloc] initWithAppId:kAppId];
SBJSON *jsonWriter = [[SBJSON new] autorelease];
NSDictionary* actionLinks = [NSArray arrayWithObjects:[NSDictionary dictionaryWithObjectsAndKeys:
@"Always Running",@"text",@"http://itsti.me/",@"href", nil], nil];
NSString *actionLinksStr = [jsonWriter stringWithObject:actionLinks];
NSDictionary* attachment = [NSDictionary dictionaryWithObjectsAndKeys:
@"a long run", @"name",
@"The Facebook Running app", @"caption",
@"it is fun", @"description",
@"http://itsti.me/", @"href", nil];
NSString *attachmentStr = [jsonWriter stringWithObject:attachment];
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
@"Share on Facebook", @"user_message_prompt",
actionLinksStr, @"action_links",
attachmentStr, @"attachment",
nil];
[_facebook dialog:@"feed" andParams:params andDelegate:self];
}
обработчик оповещения зрения нажатия кнопки
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex
{
[self share_on_facebook];
}
диалог facebook не запускается, но когда я называю share_on_facebook от обычной кнопки обработчика щелчка диалог открывается успешно.
Пожалуйста, помогите разобраться в проблеме.
Еще не успел: (не могли бы вы предоставить полный фрагмент кода ...? – deimus
Ну, мы это поняли! – deimus
Можете ли вы поделиться своим ответом? – Mugunth