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

CLI: iOS: Facebook - Error on assigning app id to the instance of Titanium.Facebook

    Details

      Description

      Error on assigning app id to the instance of Titanium.Facebook
      This is regression since the issue does not occur on 2.1.4 GA and below.

      Steps to reproduce:
      1. Create an app using the code below.

      var win1 = Titanium.UI.createWindow({  
          title:'Tab 1',
          backgroundColor:'#fff'
      });
      var facebook = Titanium.Facebook;
      	facebook.appid = "495338853813822";	
       
      var fb = facebook.createLoginButton();
      	fb.width = 80;
      	fb.height = 20;
      	fb.top = 370;
      win1.add(fb);
      win1.open();
      

      2. Launch the app.

      Actual:
      The error is thrown as below:
      'undefined' is not an object (evaluating 'facebook.appid="495338853813822"') at app.js (line 1).

      Expected:
      The app should work normally.

      But if the following code is used instead of above code, no error is thrown and the code works normally.

      var win1 = Titanium.UI.createWindow({  
          title:'Tab 1',
          backgroundColor:'#fff'
      });
      	Titanium.Facebook.appid = "495338853813822";
      	
       
      var fb = Titanium.Facebook.createLoginButton();
      	fb.width = 80;
      	fb.height = 20;
      	fb.top = 370;
      win1.add(fb);
       
      win1.open();
      

        Attachments

          Activity

            People

            • Assignee:
              cbarber Chris Barber
              Reporter:
              amittal Anshu Mittal
            • Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Git Source Code