Added facebook connect to Streams.
Some issues
- Couldn't get search headers to work, finally just changed the header file references and copied the classes into the project.
- Photo upload takes some time because of resolution, added compression but still takes considerable time, considering adding a resolution slider.
The revised code is below.
- (void)uploadPhoto:(id)target {
UIImagePickerController *ipc = [[UIImagePickerController alloc] init];
ipc.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
//ipc.mediaTypes =[UIImagePickerController availableMediaTypesForSourceType:ipc.sourceType];
ipc.delegate = self;
ipc.allowsImageEditing = NO;
[self presentModalViewController:ipc animated:YES];
}
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
NSString *mediaType = [info objectForKey:UIImagePickerControllerMediaType];
if ([mediaType isEqualToString:@"public.image"]){
// UIImage *selectedImage = [info objectForKey:UIImagePickerControllerOriginalImage];
UIImage *image = [info objectForKey:@"UIImagePickerControllerOriginalImage"];
NSLog(@"found an image");
NSDictionary *params = nil;
NSData* data = UIImageJPEGRepresentation(image, 1.0);
UIImage *img = [[UIImage alloc] initWithData:data];
photoImageView.image = img;
[[FBRequest requestWithDelegate:self] call:@"facebook.photos.upload" params:params dataParam:(NSData*)img];
}
[picker dismissModalViewControllerAnimated:YES];
}
And similar changes in cdDetailViewController.
i can give you the view controller, but I don't want to give away all the code to my project. Right now I don't have a nice way to upload the code. I need to fix my svn server.
If you send us an email , I reply with the code.
Michelle@mooncatventures.com
Posted by: michelle | 12/03/2009 at 12:40 PM
where i get complete source of Facebook connect add to Streams
Posted by: Ashwin | 12/02/2009 at 05:11 PM
How do publish stream on facebook connect. need a help to create template bundle id on create feed template in facebook account.
Posted by: Ashwin | 12/02/2009 at 02:10 PM
Tutorial is nice.
Sorry for English
I'm new to facebook connect on iphone. i need a good tutorial to develop facebook Connect.
Posted by: Ashwin | 12/02/2009 at 02:07 PM