Post photo in facebook on the friends gallery for ios -


Good morning,

I have this code to post a photo to my gallery:

  - (IBAction) postPhotoClick: (UIButton *) Sender {// Just use the icon image from the app. A real application would be a more useful way to get the image. UIImage * img = [UIImage imageNamed: @ "Icon-72@2x.png"]; // if it is available to us, we will post using the native dialog BOOL displayNativeDialog = [FBNativeDialogs presentShareDialogModallyFrom: own initial text: no image: IMG URL: void handler: nil]; (! DisplayedNativeDialog) if {[self performPublishAction: ^ {[FBRequestConnection startForUploadPhoto: img completionHandler: ^ (FBRequestConnection * connection, ID results, NSError * error) {[self showAlert: @ "post photos" Results: Results Error: error]; Self.buttonPostPhoto.enabled = Yes; }]; Self.buttonPostPhoto.enabled = No; // proceedToPost (); }]; }}   

However, I need to post photos to my friends' gallery. it's possible? How can I go about doing this?

I've found solutions using the graphing API.

After proper login:

  NSMutableDictionary * parameter = [NSMutableDictionary dictionaryWithObjectsAndKeys: self.originalImage, @ "source", @ "MessageText", @ "message" Zero]; [Self.facebook requestWithGraphPath: @ "user_name / photos /" and Param: Params and Acteepim method: @ "Post" and Dielit: self];   

This code works to post an image in my albuns. Now I need to post a picture on my friends' album.

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -