2
iOS Facebook DemoApp 예제를 사용하여 내 프로필에 게시하고 있습니다. 그것은 잘 작동합니다. 내 질문은이 게시물에 그림 링크를 어떻게 추가합니까? 내가 사용하는 코드는 다음과 같습니다.iphone facebook publishToStream 질문
- (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];
}
그림이 올라 오지 않습니다. 내가 사용하는 링크가 정확합니다. 그리고 그 소식은 성공합니다. 사진 링크를 표시하려면 어떻게해야합니까?
도움 주셔서 감사합니다.