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
To Publish FEED you have to use "USERID/feed"
Eg:
[facebook requestWithGraphPath:@"1231241/feed"
andParams:params
andHttpMethod:@"POST"
andDelegate:self];
and regarding the Properties, i dont think their is any properties with name "properties" is available for feed APIs.
Check out here: http://developers.facebook.com/docs/reference/api/photo/
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!