title: Type error: cannot read property 'clientId' of undefined
body: <p>I'm getting an error(in the android emulator) as </p>
  
  <blockquote>
    <p>Type error: cannot read property 'clientId' of undefined</p>
  </blockquote>
  
  <p>When I invoke the function <code>linkedinLogin()</code> then this error is popping up in the alert box.</p>
  
  <pre><code>`clientId = 'xxxxx';`
      linkedinLogin() {
          this.platform.ready().then(() =&gt; {
            this.linkedinPage().then(success =&gt; {
              alert(success.access_token);
            },(error) =&gt; {
              alert(error);
            });
          });
        }
  
        linkedinPage(): Promise&lt;any&gt; {
          return new Promise(function(resolve, reject) {
            var browserRef = window.cordova.InAppBrowser.open('https://www.linkedin.com/uas/oauth2/authorization?client_id=' + this.clientId + '&amp;redirect_uri=' + this.redirect_uri + '&amp;scope=' + this.appScope.join(" ") + '&amp;response_type=code&amp;state=' + this.state, '_blank', 'location=no,clearsessioncache=yes,clearcache=yes');
            browserRef.addEventListener("loadstart", (event) =&gt; {
              if((event.url).indexOf(this.redirect_uri) === 0) {
                try {
                  var requestToken = (event.url).split("code=")[1].split("&amp;")[0];
                  let headers = new Headers();
                  headers.append('Content-Type', 'application/x-www-form-urlencoded');
                  this.http.post("https://www.linkedin.com/oauth/v2/accessToken?client_id='xxxx'&amp;client_secret='xxxxx'&amp;redirect_uri=http://localhost/callback&amp;grant_type=authorization_code&amp;code=" + requestToken,
                  {headers: headers})
                  .success(function(data){
                    resolve(data);
                    alert(data);
                  })
                  .error(function(data,status) {
                    reject('problem in authenticating');
                  })
                  .finally(function() {
                    browserRef.close();
                  },10);
                } catch(e) {
                    setTimeout(function() {
                      browserRef.close();
                    }, 10);
                  }
              }
              else {
                browserRef.addEventListener("exit", function(event) {
                  reject("The linkedin sign in flow was canceled");
              });
              } 
  
            });
  
  
        });
        }
  </code></pre>