2012-08-03 132 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

相關問題