I have set up an imageView in Xcode with a image from the camera roll and I want to be able to send this photo to other users that are already in the current user's friend list. I understand how to generally upload the photo, but I don't really know how the photo is associated to the user and sent to the list of friends that the user selects. I tried to use a PFQuery but I get error messages every time I try to follow the AnyPic example on Parse's website. (The error comes off of the KPAP forkey that Xcode can't find)
The code I have works for sending a photo to the Parse server, but I don't think that the code I have is associated with the user who sent it, and it doesn't work for sending a list of people the code.
PFObject * newImage = [PFObject objectWithClassName:@"collectionView"];
NSData * imageData = UIImageJPEGRepresentation(imageView.image, 1.0f);
PFFile * newImageFile = [PFFile fileWithName:@"picture.jpeg" data:imageData];
[newImage setObject:newImageFile forKey:@"imageFile"];
[newImage saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error) {
if(!error)
{
NSLog(@"sucess");
}
}];
Any help would be greatly beneficial to me!