ccsoft / cordova-facebook

Cordova plugin that handles Facebook integration in mobile apps.
Apache License 2.0
87 stars 43 forks source link

Calling login plugin does not return anything but in XCode console see To use your Facebook account with this app, open Settings > Facebook and make sure this app is turned on. #41

Closed loria33 closed 10 years ago

loria33 commented 10 years ago

Calling login when the app is installed on ios 7 , in the facebook settings it is set to off , when calling login I get the following error in the xcode console but can't seem to get it from the javascript , Successcb and failurecb not being called. The fbook.login function never finshes.

Get the following lines in console : Sesssion Closed Error To use your Facebook account with this app, open Settings > Facebook and make sure this app is turned on.

Phonegap 3.4 .

koraybalci commented 10 years ago

Looks like you already have the answer in your question. What more can I say?

7 Eylül 2014 Pazar tarihinde, loria33 notifications@github.com yazdı:

Calling login when the app is installed on ios 7 , in the facebook settings it is set to off , when calling login I get the following error in the xcode console but can't seem to get it from the javascript , Successcb and failurecb not being called. Get the following lines in console : Sesssion Closed Error To use your Facebook account with this app, open Settings > Facebook and make sure this app is turned on.

Phonegap 3.4 .

— Reply to this email directly or view it on GitHub https://github.com/ccsoft/cordova-facebook/issues/41.

Koray Balcı CC Yazılım ve Danışmanlık Ltd. www.ccyazilim.com GSM: 0533 938 66 77

loria33 commented 10 years ago

I know what I have to do on the phone or ipad itself to fix this. The problem is that the javascript callback on login does not fire. IN the console what I see is generated by Objective C code and not a console.log function call.

koraybalci commented 10 years ago

I suppose you want the error text to be propagated to js side, which is a plausible request. However, if you check sessionStateChanged Objective-C method of the plugin, you will see that we are actually trying to do that if Facebook tells us there is an error. There might be a bug in that part of the code, but I cannot see any. Feel free to check that code and contribute back by a pull request if you can. I will be more than happy to merge any pulls that fixes it. But my guess is Facebook SDK is the evil here (though I might be wrong of course).