Q:

Facebook Post through iOS sdk, sometimes misses the picture

I am posting to the Facebook feed of user through the following code.
70 - 90 % of the times it get posted fine, along with the image, but sometimes it gets posted but without image and without any error. 
Can anybody explain what can be the reason?
[params setObject:@"1234"  forKey:@"name"];
[params setObject:@"1234"  forKey:@"caption"];
[params setObject:@"description" forKey:@"description"];
[params setObject:item.itemURL forKey:@"link"];
[params setObject:item.itemPictureURL forKey:@"picture"];
[params setObject:facebook.accessToken forKey:@"access_token"];
[facebook requestWithGraphPath:@"/me/feed" andParams:params andHttpMethod:@"POST" andDelegate:self];

Although the image is at the specified picture url.
Thanks -

A:

This happens because the url calls ie loading of image through the web or any web call is asynchronous also it does on another thread not on main thread so some times the call is made after the call of posting on fb so the image is not available at that time. so you need to load the required image first and check that the image is available at the time of call to post on FB

