Hi everybody!
Can someone give me a peace of support about my code?
I'd like to post a pic to FB wall!
The FB sdk sends my pic correctly, but it is not appear in FB's wall!
I don't know why!
I use this code:
MyViewController.m:
- (IBAction) btnPostPress

id) sender {
NSString *imgTxt = @"myimg";
UIImage *img = [UIImage imageNamed:@"myicon.png"];
FBFeedPost *post = [[FBFeedPost alloc] initWithWithPhoto:img name:customTxt];
[post publishPostWithDelegate:self];
}
FBFeedPost.m:
- (void) publishPostWithDelegate

id) _delegate {
//store the delegate incase the user needs to login
self.delegate = _delegate;
// if the user is not currently logged in begin the session
BOOL loggedIn = [[FBRequestWrapper defaultManager] isLoggedIn];
if (!loggedIn) {
[[FBRequestWrapper defaultManager] FBSessionBegin:self];
}
else {
NSMutableDictionary *params = [[[NSMutableDictionary alloc] init] autorelease];
//Need to provide POST parameters to the Facebook SDK for the specific post type
[params setObject:self.image forKey:@"source"];
[params setObject:self.caption forKey:@"message"];
[[FBRequestWrapper defaultManager] sendFBRequestWithGraphPath:@"me/photos" params

arams andDelegate:self];
}
}