Hi,
1030 works fine, but broke our own plugin for facebook native share dialog, since you have moved your own code into a plugin (Enterprise).
Error Domain=com.facebook.sdk Code=7 “The operation couldn’t be completed. (com.facebook.sdk error 7.)” UserInfo=0x1ab85fd0 {com.facebook.sdk:NativeDialogReasonKey=NativeDialogInvalidForSession}
Thus we need this piece of code inserted in your plugin asap (we should have submitted to Apple today, but need to wait for you to update):
#import <facebooksdk><br>#import <facebooksdk><br><br>int<br>PluginNativeFacebook::ShowDialogForReal( lua_State *L)<br>{<br> UIViewController *viewController = fRuntime.appViewController;<br> <br> const char *txt = lua_tostring( L, 1 );<br> const char *img = lua_tostring( L, 2 );<br> const char *url = lua_tostring( L, 3 );<br> int listenerIndex = 4;<br> <br> if (NULL == fListener) {<br> if ( CoronaLuaIsListener( L, listenerIndex, kEvent ) )<br> {<br> CoronaLuaRef listener = CoronaLuaNewRef( L, listenerIndex );<br> fListener = listener;<br> }<br> }<br> <br> [FBNativeDialogs<br> presentShareDialogModallyFrom:viewController<br> initialText:[NSString stringWithFormat:@"%s", txt]<br> image:[UIImage imageWithContentsOfFile:[NSString stringWithFormat:@"%s", img]]<br> url:[NSURL URLWithString:[NSString stringWithFormat:@"%s", url]]<br> handler:^(FBNativeDialogResult result, NSError *error) {<br> <br> // Only show the error if it is not due to the dialog<br> // not being supporte, i.e. code = 7, otherwise ignore<br> // because our fallback will show the share view controller.<br> if (error && [error code] == 7) {<br> NSLog(@"Not supported");<br> NSLog(@"%@", error.debugDescription);<br> <br> char status[] = "error";<br> DispatchEvent(true, status);<br> } else {<br> NSLog(@"Supported, what next?");<br> NSString *alertText = @"";<br> if (error) {<br> alertText = [NSString stringWithFormat:<br> @"error: domain = %@, code = %d",<br> error.domain, error.code];<br> <br> } else if (result == FBNativeDialogResultSucceeded) {<br> NSLog(@"Posted successfully");<br> char status[] = "success";<br> DispatchEvent(true, status);<br> } else if (result == FBNativeDialogResultCancelled) {<br> NSLog(@"Cancelled");<br> char status[] = "cancelled";<br> DispatchEvent(true, status);<br> } else if (result == FBNativeDialogResultError) {<br> NSLog(@"Got an error");<br> char status[] = "error";<br> DispatchEvent(true, status);<br> } else if (![alertText isEqualToString:@""]) {<br> NSLog(@"%@", alertText);<br> char status[] = "error";<br> DispatchEvent(true, status);<br> } else {<br> NSLog(@"Just an error, not sure why");<br> char status[] = "error";<br> DispatchEvent(true, status);<br> }<br> }<br> }];<br> <br> return 0;<br>}<br><br>int<br>PluginNativeFacebook::ShowDialog(lua_State *L)<br>{<br> NSLog( @"Show Dialog, Native Facebook Plugin, version %s.", version);<br> <br> Self *provider = ToLibrary(L);<br> provider->ShowDialogForReal(L);<br> <br> return 0;<br>}<br> [import]uid: 21746 topic_id: 34416 reply_id: 142869[/import]