How to post photos to facebook iphone fbconnect

后端 未结 2 1921
时光说笑
时光说笑 2021-01-07 12:26

Hi I\'m using FBConnect to post to facebook, now I need to post photos from library or taken with the cam, does anyone has a clue how to do this ?? I\'ve searched in google

相关标签:
2条回答
  • 2021-01-07 13:06

    The requestWithGraphPath method is non-blocking - meaning it will complete before the photo is actually uploaded. You'll know when the photo is finished uploading by implementing the following in your FBRequestDelegate

    0 讨论(0)
  • 2021-01-07 13:17

    You can now post photos on your wall with requestWithGraphPath method as follows.

    NSData *yourImageData= UIImagePNGRepresentation(yourImage);
    
    NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                   @"Your text with picture", @"message", yourImageData, @"source", nil];
    
    [facebook requestWithGraphPath:@"/me/photos" andParams:params andHttpMethod:@"POST" andDelegate:self];
    
    0 讨论(0)
提交回复
热议问题