Iphone Facebook IOS Uploading images that take too long?

I upload photos to my facebook wall uising Facebook IOS sdk graph API. Everything works fine, this is the usual code that I use:

// Here i am compressing the image
NSData *yourImageData= UIImageJPEGRepresentation([_images objectAtIndex:pageIndex],0.5);

NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                       @"Photo taken with my app", @"message", yourImageData, @"source", nil];

[_facebook requestWithGraphPath:@"/me/photos" andParams:params andHttpMethod:@"POST" andDelegate:self];

So my question is, should I compress my image further? or is there any other way for photos to be downloaded faster?

Thanks a lot, fan

+3
source share
1 answer

Update the new SDK 3.0.8 and use the FBRequest class

https://developers.facebook.com/docs/sdk-reference/iossdk/3.0/class/FBRequest/#//api/name/requestForUploadPhoto :

You can see how this can be done in the sample application as part of the SDK (Hackbook or Scrumptuous).

Thank!

0

All Articles