NSDictionary *firstDict = [NSDictionary dictionaryWithObjectsAndKeys:@"image", @"Type", @"http://mysite.com/image.jpg", @"src", @"http://mysite.com/page.html", @"href", nil];
NSDictionary *secondDict = [NSDictionary dictionaryWithObjectsAndKeys:@"image", @"Type", @"http://mysite.com/image.jpg", @"src", @"http://mysite.com/page.html", @"href", nil];
NSArray *mediaArray = [[NSArray alloc] initWithObjects:firstDict, secondDict, nil];
NSArray *keys = [NSArray arrayWithObjects:@"name", @"description", @"href", @"media", nil];
NSArray *objects = [NSArray arrayWithObjects:[NSString stringWithString:@"MyTitle"], [NSString stringWithString:@"My caption"],[NSString stringWithString:@"http://mysite.com/page.html"], mediaArray, nil];
NSDictionary *attachment = [NSDictionary dictionaryWithObjects:objects forKeys:keys];
[[FBRequest requestWithDelegate:self] call:@"facebook.stream.publish" params:attachment];
|