Я использую пример iOS facebook DemoApp для публикации в своем профиле.Работает просто отлично.У меня вопрос, как мне добавить ссылку на картинку к этому сообщению?Код, который я использую:
- (IBAction)publishStream:(id)sender
{
SBJSON *jsonWriter = [[SBJSON new] autorelease];
NSDictionary* actionLinks = [NSArray arrayWithObjects:[NSDictionary dictionaryWithObjectsAndKeys:
@"title",@"text",
@"http://www.link.com/",@"href",
nil], nil];
NSString *actionLinksStr = [jsonWriter stringWithObject:actionLinks];
NSDictionary* attachment = [NSDictionary dictionaryWithObjectsAndKeys:
@"This is a name!", @"name",
@"This is a caption!", @"caption",
@"http://www.link.com/images/log1.png", @"picture",
@"This is a long description that goes on an on.", @"description",
@"http://www.link.com", @"href",
nil];
NSString *attachmentStr = [jsonWriter stringWithObject:attachment];
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
kAppId, @"api_key",
@"Share on Facebook", @"user_message_prompt",
actionLinksStr, @"action_links",
attachmentStr, @"attachment",
nil];
[facebook dialog:@"stream.publish"
andParams:params
andDelegate:self];
}
Изображение не появится.Ссылка, которую я использую, верна.И пост удаётся.Как мне получить эту ссылку для показа?
Спасибо за любую помощь.