How to post a photos on facebook through iPhone app? -


I am trying to post an image on facebook but have not been successful yet, my codes are:

  - (zero) posttrack {IIM IIM = 1; NSDTA * MyMagatta; MyimgData = [NSData DataWidth Contentoff: saveImagePath]; // pstimg = myimg data; NSArray * chunks = [separable string from pstimg components: @ "."]; NSString * atch = [section ObjectEntIndex: 0]; NSString * filePath = [[NSBundle main bundle] pathForResource: atch ofType: @ "jpg"]; IMG = [[UIImage alloc] initWithContentsOfFile: filePath]; // Start FBDialog * Dialog = [[[FBstream Dialog Alloc] init] autorelease]; NSString * str = @ "Hello"; Str = [Str String Bayer Recording Okurrenceoffstring: @ "" with string: @ "+"]; Dialog.cmessage = str; Dialog.userMessagePrompt = @ "Enter your message:"; [Dialog show]; NSDTA * search; // Edit from here (IM == 1) {findata = myimgData; } Other {findata = (NSDT *) img; } NSMutableDictionary * param = [Object Endake with NSMutableDictionary Dictionary: IMG, @ "photo", zero]; FBSEEEST * UploadFotoRquest = [with FBRAKEST Request Predict: Self]; [Upload photo radio call: @ "facebook.photos.upload" parameter: Ultimate dataparam: mimegata]; [IMG release];   

}

but it has not been posted.

To post a photo on Facebook, you need to use iOS SDK from Facebook: < / P>

There you will find a sample app with authentication and more, such as posting a photo.

Comments