2012-08-03 108 views

回答

0

这里是笏我在我的应用程序中使用:

- (void)uploadImage:(UIImage *)image withName:(NSString *)name 
{ 
    if (image) 
    { 
     incomingRequests++; 
     //Image settings/parameters 
     NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys: 
             name,@"caption",image, @"picture", 
             nil]; 

     //method to upload images 
     [self.facebook requestWithMethodName:@"photos.upload" 
            andParams:params 
           andHttpMethod:@"POST" 
           andDelegate:self]; 

     NSString *tempRequestString = [[NSString alloc] initWithString:@"photoUpload"]; 
     self.facebook.request_string = tempRequestString; 
     [tempRequestString release]; 
    } 
} 

请参阅本教程以更好地理解:How To Use Facebook’s New Graph API from your iPhone App

+0

感谢您的回复.. – 2012-08-06 08:43:03

相关问题