I'm using the latest Facebook SDK on iOS 5. I can use SSO to successfully authenticate the user, and then I attempt to share a link like this:
NSString *appId = [[[NSBundle mainBundle] infoDictionary] objectForKey:TSFacebookAppID]; NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys: appId, @"app_id", [url absoluteString], @"link title, @"caption", body, @"description", nil]; [facebook dialog:@"feed" andParams:params andDelegate:self];
The first time I attempt this, the dialog appears and immediately closes, calling the dialog:didFailWithError:error delegate method. The error is:
Error Domain=NSURLErrorDomain Code=-999 "The operation couldn’t be completed. (NSURLErrorDomain error -999.)" UserInfo=0x98f2ab0 {NSErrorFailingURLKey=https://m.facebook.com/dialog/feed?link=http%3A%2F%2Fwww.thescore.com%2Fhome%2Farticles%2F184248&description=Nadal%20pulls%20out%20of%20Paris%20to%20focus%20on%20ATP%20finals&access_token=BAABw00HZB06cBALT57lZCM24N4EOtPpOQeCgl7oLUvbHFR0ZAlwgAbPHQ7HANmlBE0aUKVNDmWNYsEqB0wXq28vm4D18T5hLTVDK3x2WjnVjgIVl75RPoOszSB21f4ZD&caption=Article%20from%20ScoreMobile%20for%20iPhone&app_id=124052647629735&redirect_uri=fbconnect%3A%2F%2Fsuccess&sdk=2&display=touch, NSErrorFailingURLStringKey=https://m.facebook.com/dialog/feed?link=http%3A%2F%2Fwww.thescore.com%2Fhome%2Farticles%2F184248&description=Nadal%20pulls%20out%20of%20Paris%20to%20focus%20on%20ATP%20finals&access_token=BAABw00HZB06cBALT57lZCM24N4EOtPpOQeCgl7oLUvbHFR0ZAlwgAbPHQ7HANmlBE0aUKVNDmWNYsEqB0wXq28vm4D18T5hLTVDK3x2WjnVjgIVl75RPoOszSB21f4ZD&caption=Article%20from%20ScoreMobile%20for%20iPhone&app_id=124052647629735&redirect_uri=fbconnect%3A%2F%2Fsuccess&sdk=2&display=touch}
However, subsequent attempts to share the link work fine.
Just an update for everyone, it's finally assigned to somebody at Facebook: https://developers.facebook.com/bugs/168127053284477 - hopefully it will be fixed soon.
Meanwhile, somebody sent a pull request on github with a fix: https://github.com/facebook/facebook-ios-sdk/pull/436
Hope it helps someone, as I was still facing the same bug..
2.1m questions
2.1m answers
60 comments
57.0k users