0

it will be just like repeated question on first look but it is not please read it till the end.

I can able to post images using the fb graph api.

1) I am able to post photos but it takes around 2 to 2.5 minites how to optimize it ie how to make it will take lesser time? 2) during the posting it give me nslog on ever 10 seconds like this

 void SendDelegateMessage(NSInvocation*): delegate (webView:resource:didFinishLoadingFromDataSource:) failed to return after waiting 10 seconds. main run loop mode: _kCFURLConnectionPrivateRunLoopMode

how to code so i dont get this log?

My code for calling fb graph is from this example

The iOSDev
  • 5,237
  • 7
  • 41
  • 78
  • Where's the delay, is it because the photos are large files? if you resize the image client side before posting it is it still a problem? – Igy May 12 '12 at 16:01
  • i don't know how to re-size the images at client side? can you give me some guideline for it any link or any thing will be appriciated – The iOSDev May 13 '12 at 12:59
  • http://stackoverflow.com/questions/4394491/how-to-compress-resize-image-on-iphone-os-sdk-before-uploading-to-a-server – Igy May 13 '12 at 16:09

1 Answers1

0

Ok from the link or the question link given by @lgy i got the best working solution it is as below

UIGraphicsBeginImageContext(newSize);
[image drawInRect:CGRectMake(0,0,newSize.width,newSize.height)];
UIImage* newImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();

thanks to @Tuan Nguyen who give the answer there i just repeat it as it helps me a lot and newSize is CGSize type variable Happy Coding :)

The iOSDev
  • 5,237
  • 7
  • 41
  • 78