diff --git a/platforms/ios/HelloCordova/Plugins/com.phonegap.plugins.facebookconnect/FacebookConnectPlugin.m b/platforms/ios/HelloCordova/Plugins/com.phonegap.plugins.facebookconnect/FacebookConnectPlugin.m index 2cf4e6d3e..98b7b0058 100644 --- a/platforms/ios/HelloCordova/Plugins/com.phonegap.plugins.facebookconnect/FacebookConnectPlugin.m +++ b/platforms/ios/HelloCordova/Plugins/com.phonegap.plugins.facebookconnect/FacebookConnectPlugin.m @@ -15,7 +15,6 @@ @interface FacebookConnectPlugin () @property (strong, nonatomic) NSString *userid; @property (strong, nonatomic) NSString* loginCallbackId; @property (strong, nonatomic) NSString* dialogCallbackId; -@property (strong, nonatomic) NSString* graphCallbackId; @end @@ -496,8 +495,6 @@ - (void) showDialog:(CDVInvokedUrlCommand*)command - (void) graphApi:(CDVInvokedUrlCommand *)command { - // Save the callback ID - self.graphCallbackId = command.callbackId; NSString *graphPath = [command argumentAtIndex:0]; NSArray *permissionsNeeded = [command argumentAtIndex:1]; @@ -523,7 +520,7 @@ - (void) graphApi:(CDVInvokedUrlCommand *)command // Permission granted NSLog(@"new permissions %@", [FBSession.activeSession permissions]); // We can request the user information - [self makeGraphCall:graphPath]; + [self makeGraphCall:graphPath callbackId:command.callbackId]; } else { // An error occurred, we need to handle the error // See: https://developers.facebook.com/docs/ios/errors @@ -532,11 +529,11 @@ - (void) graphApi:(CDVInvokedUrlCommand *)command } else { // Permissions are present // We can request the user information - [self makeGraphCall:graphPath]; + [self makeGraphCall:graphPath callbackId:command.callbackId]; } } -- (void) makeGraphCall:(NSString *)graphPath +- (void) makeGraphCall:(NSString *)graphPath callbackId: (NSString *) callbackId { NSLog(@"Graph Path = %@", graphPath); @@ -552,7 +549,7 @@ - (void) makeGraphCall:(NSString *)graphPath pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:[error localizedDescription]]; } - [self.commandDelegate sendPluginResult:pluginResult callbackId:self.graphCallbackId]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:callbackId]; }]; } diff --git a/plugin.xml b/plugin.xml index 7c1d78421..6c1eef7a1 100644 --- a/plugin.xml +++ b/plugin.xml @@ -101,6 +101,29 @@ + + + NSAllowsArbitraryLoads + + + + + + fbapi + fbapi20130214 + fbapi20130410 + fbapi20130702 + fbapi20131010 + fbapi20131219 + fbapi20140410 + fbapi20140116 + fbapi20150313 + fbapi20150629 + fbauth + fbauth2 + + +