Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-3211

iOS: Facebook module loggedIn never true when Safari restricted

    Details

      Description

      {html}<div><p>When you restrict Safari and authorize() or us the facebook
      button, everything seems to work properly but loggedIn is never
      true and the facebook button never changes to 'logout'</p>
      <p>Step 0: restrict Safari via
      (Settings>General>Restrictions)<br>
      Step 1: install app<br>
      Step 2: click the 'loggedIn' button<br>
      Step 3: Label says false<br>
      Step 4: click 'authorize()' or Facebook button and login<br>
      Step 5: notice FB button still says Login<br>
      Step 6: click the 'loggedIn' button<br>
      Step 7: Label says false</p>
      <pre>
      <code class="javascript">var win = Titanium.UI.createWindow({
      backgroundColor:'#fff'
      });

      Titanium.Facebook.appid = '187692147928682';
      Titanium.Facebook.permissions = ['publish_stream'];

      var statusLabel = Ti.UI.createLabel({
      text: 'click status',
      top: 0,
      width: 300,
      height: 60
      });

      var statusButton = Titanium.UI.createButton({
      title: 'loggedIn',
      bottom: 300,
      width: 300,
      height: 60
      });
      statusButton.addEventListener('click', function(e) {
      Ti.API.info('Facebook loggedIn: '+Ti.Facebook.loggedIn);
      statusLabel.text = 'Facebook loggedIn: '+Ti.Facebook.loggedIn;
      });

      var fbAuthButton = Titanium.UI.createButton({
      title: 'authorize()',
      bottom: 100,
      width: 300,
      height: 60
      });
      fbAuthButton.addEventListener('click', function(e) {
      Titanium.Facebook.authorize();
      });

      var fbButton = Titanium.Facebook.createLoginButton({
      'style': 'wide',
      'sessionProxy': 'http://api.appcelerator.net/p/fbconnect/',
      bottom: 50,
      height: 30,
      width: 300
      });

      win.add(statusLabel);
      win.add(statusButton);
      win.add(fbAuthButton);
      win.add(fbButton);
      win.open();</code>
      </pre>
      <h3>Tested on</h3>
      <p>TiSDK 1.6.0GA, iOS 4.2.1, iPhone4</p>
      <h3>Associated Helpdesk Ticket</h3>
      <p><a href=
      "http://developer.appcelerator.com/helpdesk/view/75411">http://developer.appcelerator.com/helpdesk/view/75411</a></p></div>{html}

        Attachments

          Activity

            People

            • Assignee:
              rpfeiffer Ralf Pfeiffer
              Reporter:
              jalter Jon Alter
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-2766
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Integration