Uploaded image for project: 'Appcelerator Modules'
  1. Appcelerator Modules
  2. MOD-2273

Facebook Module: Can't login another FB account once logged in first.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: None
    • Resolution: Not Our Bug
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Facebook
    • Environment:

      FaceBook Module 5.2.0
      TiSDK 5.3.1

      Description

      Reproduce Step.

      1. Copy the following code to app.js file.

      var fb = require('facebook');
       
      var win = Ti.UI.createWindow({
      	title : 'Login/Logout',
      	backgroundColor: "white"
      });
       
      //fb module listener
      fb.addEventListener('login', function(e) {
      	if (e.success) {
      		alert('login from uid: ' + e.uid + ', name: ' + JSON.parse(e.data).name);
      	} else if (e.cancelled) {
      		// user cancelled
      		alert('cancelled');
      	} else {
      		alert(e.error);
      	}
      });
       
      fb.addEventListener('logout', function(e) {
      	alert('logged out');
      });
       
      var loginButton = fb.createLoginButton({
      	readPermissions : ['read_stream', 'email'],
      	height: 100,
      	width: 100,
      	top : 260
      });
      win.add(loginButton);
       
      var CurrentStatus = Ti.UI.createButton({
      	title : 'Current Status',
      	top : 50,
      	width : 160,
      	height : 40
      });
      win.add(CurrentStatus);
       
      CurrentStatus.addEventListener('click', function() {
      	if (fb.getLoggedIn()) {
      		alert("Current UID: " + fb.getUid());
      	} else {
      		alert('Not logged in.');
      	}
      });
       
      win.open();
      

      2. Setting all the necessary key pair for facebook (ref: our doc)
      3. Run the app.

      Problem.

      1. If you run it first time, it will be fine. Then if you click the same button to logout. Then click login again. You will not able to login another account. Always the same one.
      2. Even you set the facebook account in device -> setting, it will not impact the result. Change the account in setting, does not help too.

      Note.

      Sometimes, clean the browser will help. But not all the time, not sure why.

      Help advise.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hknoechel Hans Knöchel
                Reporter:
                sliang Shuo Liang
              • Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Integration