Telerik-Verified-Plugins / Facebook

The official plugin for Facebook in Apache Cordova/PhoneGap
Other
84 stars 34 forks source link

Graph API upgrade notice #18

Open rossi256 opened 8 years ago

rossi256 commented 8 years ago

Guess you also have received the graph API notice from FB. I am using this plugin cause its the only way i found to keep on using the native FB App for login on iOS. Any other plugin or newer SDK (facebook4) opens that safari window and says "This app was alread authorized" with the user having to interact and press OK (or cancel)...

Is there any plan to update/upgrade the used SDK/GraphAPI in this plugin?

rossi256 commented 8 years ago

ref: https://github.com/Wizcorp/phonegap-facebook-plugin/issues/1284

EddyVerbruggen commented 8 years ago

Hi, the way I'm reading this the Facebook SDK needs to be updated from 3.x to 4.x. That would probably mean you'll get the same behavior as the facebook4 plugin you mentioned.

Can you look at that plugin and see if there's a way to integrate it into your app in a way you're satisfied?

EddyVerbruggen commented 8 years ago

FYI: because of this I'm going to upgrade our fork to use the facebook4 plugin instead as it doesn't make sense to scatter the plugin landscape any further by proving our own version of the facebook4 plugin.

rossi256 commented 8 years ago

i was trying https://github.com/Wizcorp/phonegap-facebook-plugin and i get the safari web login there i was just before again trying the facebook4 plugin and i get the safari web login there. Your fork is the only one that really uses the native FB app for login.

I wouldn't mind not using the native app so much, if the user experience would ge good/ok - but having a web page open up saying "you have already authorized this app" / OK/CANCEL is really annoying...

EddyVerbruggen commented 8 years ago

If that webpage opening issue is observed on iOS then I'm guessing the wizcorp plugin's iOS 9 whitelist is outdated.

As for the ".. already .." message, I'm sure that can be tackled.. does this help?

EddyVerbruggen commented 8 years ago

Just tested facebook4. For iOS you can get the current login status by using this method:

        facebookConnectPlugin.getLoginStatus(function(response) {
          if (response.status === "connected") {
            alert("You are logged in, details:\n\n" + JSON.stringify(response.authResponse));
          } else {
            alert("You are not logged in");
          }
        });

If you are indeed logged in you don't need to call facebookConnectPlugin.login() avoiding the Facebook consent screen popping up.

Does that help?

rossi256 commented 8 years ago

thanks a lot for getting back to me on this - sorry didn't reply to your suggestion before... the whitelist should be fine and the 2nd link you posted for the "....already..." message didn't help unfortunately.

I will test your code tomorrow morning.... thanks!!!!

EddyVerbruggen commented 8 years ago

Hey @rossi256, I've just released 1.7.1.2 which upgrades the SDK and no longer uses the deprecated graph API. I hope it also helps for your loginstatus case.

rossi256 commented 8 years ago

Hey @EddyVerbruggen i just installed. first i had to remove old SDK in xcode to be able to run the app. now i have the same as before - web-app opening and "...already...." message... i have not implemented this suggestion of yours just above yet though... need my devleoper to do that...

EddyVerbruggen commented 8 years ago

Yeah, that's required in any implementation of the Facebook SDK. So let's wait and see.