I\'ve been trying desperately to publish a message with an attachment to the current user\'s wall using Facebook\'s Graph API. I\'ve been successful at publishing a POST obj
OK, I found how to send properties together with my stream post. I discovered it by taking a look at the html in the actual Facebook Wall page. Turns out, the parameters for the POST object are considered the attachment so the only thing to be done is add the "properties" property directly to the POST parameters like this:
NSDictionary *properties = [NSDictionary dictionaryWithObjectsAndKeys:
@"property 1", @"PROP1",
@"property 2", @"PROP2",
nil];
NSString *propStr = [jsonWriter stringWithObject:properties];
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
@"post", @"type",
@"http://my.web.com/pic.png", @"picture",
@"http://my.web.com", @"link",
postName, @"name",
postCaption, @"caption",
postDescription, @"description",
postMessage, @"message",
propStr, @"properties",
nil];
[_facebook requestWithGraphPath:@"me/feed" andParams:params andHttpMethod:@"POST" andDelegate:self];
And voila! It worked!