0

I am using this code for posting image, but don't get image ID in response.

FBSDKSharePhoto *photo = [[FBSDKSharePhoto alloc] init];
photo.image = self.image.image;
photo.userGenerated = YES;
FBSDKSharePhotoContent *content = [[FBSDKSharePhotoContent alloc] init];
content.photos = @[photo];
[FBSDKShareDialog showFromViewController:self
                             withContent:content
                                delegate:self];
Sergey Kuryanov
  • 6,114
  • 30
  • 52
shareInfo
  • 11
  • 4
  • Title changed, code formatted, tag added – Sergey Kuryanov May 02 '15 at 09:22
  • Tried posting to album? http://stackoverflow.com/a/8330084/1081340 – Vrashabh Irde May 04 '15 at 07:00
  • Now I get photo Id by using this lines of code -> NSMutableDictionary* photosParams = [NSMutableDictionary dictionaryWithObjectsAndKeys:imgSource,@"source",strMessage,@"message",nil]; [[[FBSDKGraphRequest alloc] initWithGraphPath:@"me/photos"parameters:photosParams HTTPMethod:@"POST"] startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) { if ([error.userInfo[FBSDKGraphRequestErrorGraphErrorCode] isEqual:@200]) { } }]; – shareInfo May 04 '15 at 08:08
  • That code should work. What error are you getting? – Shireesh Asthana May 05 '15 at 21:52

0 Answers0