This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NSMutableDictionary* params = [[NSMutableDictionary alloc] init]; | |
| [params setObject:@"your custom message" forKey:@"message"]; | |
| [params setObject:UIImagePNGRepresentation(_image) forKey:@"picture"]; | |
| _shareToFbBtn.enabled = NO; //for not allowing multiple hits | |
| [FBRequestConnection startWithGraphPath:@"me/photos" | |
| parameters:params | |
| HTTPMethod:@"POST" | |
| completionHandler:^(FBRequestConnection *connection, | |
| id result, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NSString *boundary = @"cce6735153bf14e47e999e68bb183e70a1fa7fc89722fc1efdf03a917340"; | |
| // create request | |
| NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init]; | |
| [request setCachePolicy:NSURLRequestReloadIgnoringLocalCacheData]; | |
| [request setHTTPShouldHandleCookies:NO]; | |
| [request setTimeoutInterval:30]; | |
| [request setHTTPMethod:@"POST"]; | |
| // set Content-Type in HTTP header |