Facebook Sample - Logged in & Logout

4 posts, 0 answers
  1. HSLaw
    HSLaw avatar
    153 posts
    Member since:
    Jan 2006

    Posted 15 Sep 2014 Link to this post

    Hi,

    I'm trying the sample on http://docs.telerik.com/platform/appbuilder/sample-apps/sample-facebook-api

    My questions:

    1. Logged in:
    - How do we detect a user is already logged in?  So that we can hide the login button and show the logout button.

    2. Logout:
    Tried the codes to revoke permission & wipe the token (below). But it does not clear the logged in user fully.  When I click Login again, I no need to key in username & password and can just click OK to continue.  How can I logout so that I need to key in the username and password again?

    01.$.oajax({
    02.          type: "DELETE",
    03.          url: "https://graph.facebook.com/me/permissions",
    04.          jso_provider: "facebook",
    05.          jso_allowia: true,
    06.          dataType: 'json',
    07.          success: function(data) {
    08.              outputlog("Delete response (facebook):");
    09.              outputlog(data);
    10.          },
    11.          error: function(e) {
    12.              outputlog(e);
    13.          }
    14.      });
    15. 
    16.      outputlog("wipe tokens");
    17.     jso_wipe();


    Thanks.


  2. Anton Dobrev
    Admin
    Anton Dobrev avatar
    539 posts

    Posted 17 Sep 2014 Link to this post

    Hi,

    1. You can detect when the user is logged in your app in the success handler of the login method.

    2. I assume that the user is logged in the native FB app on the device which persists the token on the device. This is probably the main reason why the user logged in your app cannot log out it.

    In addition, there is a forum thread about the issues in the pure JavaScript (as in the sample app) implementation of the plugin which you can consult here.

    Let me know if further questions arise.

    Regards,
    Anton Dobrev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. Anton Dobrev
    Admin
    Anton Dobrev avatar
    539 posts

    Posted 25 Sep 2014 Link to this post

    Hi,

    Just a quick follow-up. I updated the forum thread here with a Telerik AppBuilder-compatible version of the Facebook Connect plugin and a sample app that uses it.

    Let me know if this is helpful for you.

    Best regards,
    Anton Dobrev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  4. HSLaw
    HSLaw avatar
    153 posts
    Member since:
    Jan 2006

    Posted 26 Sep 2014 in reply to Anton Dobrev Link to this post

    Thanks Anton,

    I will follow up in the other thread.
Back to Top