- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using the Facebook plugin featured in Intel XDK (v 1826). The plugin works fine. I am redirected to a Safari page (on the iPhone) to login. On subsequent login attempts, the user gets redirected to a Safari page with a message - "You have already authorized [my app name]." User can press OK or cancel. Pressing OK redirects back to my app no issues. Is there a way to avoid this confirmation though? A setting that I can pass to avoid this? My code is simply:
$scope.fbLogin = function(){ facebookConnectPlugin.login(["public_profile"], fbLoginSuccess, function (error) { alert("Facebook login error: " + error); } ); };
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When you log into facebook, you get an accessToken back. Why dont you set a cookie to TRUE when you get a accessToken, then when you go to log into facebook again, first check to see if you have an valid cookie, if so, dont continue the login.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well I didn't mean the user is getting this trying to login repeatedly. The user is logging out in between. Sequence is:
1) Login to FB (via redirect page).
2) Logout in my app
3) Login to FB (again via redirect page).
During #1, the user sees the facebook login page in safari (as expected). During #3, the user sees the "You have already authorized [my app]" confirmation page in safari.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What do you mean by:
2) Logout in my app
Do you have a logout function of your app, or are you just closing your app? I typically test the fb stuff with the logged into the fb app on device. Its a smoother experience and most everyone already has it on their device. Can you test that way and see if it makes a difference?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes I have a log out function in my app that clears the access token. But the issue is why the FB site I get redirected to likes to let me know that I have already authorized this app. Something about my call to the FB plugin maybe not quite right? It should just redirect me back to the app without the confirmation each time no?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Bingo. That got me to avoid the silly confirmation page! Update code:
facebookConnectPlugin.getLoginStatus(function(currentStatus){ if (currentStatus.status == "connected"){ fbLoginSuccess(currentStatus); } else { facebookConnectPlugin.login(["public_profile"], fbLoginSuccess, function (error) { alert("Facebook login error: " + error); } ); } }, function (error) { alert("Facebook login status error: " + error); } );
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Hooman F.
How you include the plugin on your project?
Do you include the plugin that have the XDK?, because I'm using one plugin that I download and it work in the emulator but not in the device. I don't why.
Thanks.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page