Signup for the Ionic Newsletter to get the latest news and updates!

  • faraazc

    You have used ngFor..won’t this be less performance .since it is a data driven app how about going to virtual scroll plus infinite scroll..

  • Max

    Great post. I get the following error, some hints?

    Typescript Error
    Supplied parameters do not match any signature of call target.

    src/providers/twitter-utils.ts

    headerParameters.oauth_signature = encodeURIComponent(oauthSignatureObject.getHMAC(encodeURIComponent(secretKey) + “&” + encodedTokenSecret, “TEXT”, “SHA-1”, “B64”));
    var headerParameterKeys = Object.keys(headerParameters);

    • http://e10.in/ Anuj Pandey

      Any idea ?

      • Max

        Nope! You?

        • uzair

          Facing the same error 🙁

    • Aamir

      same here 🙁

    • Max

      It is probably related to @types/jssha ( https://github.com/Caligatio/jsSHA/issues/51 )

      Getting rid of it I get a


      Error @Component templateUrl missing in:
      ".../twitter-app-ionic-2/src/app/app.component.ts"

      because of the


      @Component({
      template: ``
      })

      Finally:


      @Component({
      templateUrl: 'app.html'
      })

      works.

    • Philson Nah

      Same error here. Can’t build. Anyone has a solution?

    • Yoshinori Satoh

      I found that after second parameters of getHMAC are invalid.
      Second parameter is array.

      /**
      * Returns the the HMAC in the specified format using the key given by
      * a previous setHMACKey call.
      *
      * @param {string} format The desired output formatting
      * (B64, HEX, or BYTES)
      * @param {{outputUpper : (boolean|undefined), b64Pad : (string|undefined)}=}
      * outputFormatOpts associative array of output formatting options
      * @return {string} The string representation of the hash in the format
      * specified
      */
      getHMAC(format:string, outputFormatOpts?:OutputFormatOptions):string

      I have modified as below and work in my local environment.

      headerParameters.oauth_signature = encodeURIComponent(oauthSignatureObject.getHMAC(encodeURIComponent(secretKey) + “&” + encodedTokenSecret, [“TEXT”, “SHA-1”, “B64”]));

      • Francesco Mussi

        This fixed the problem for me! Thanks!

  • https://github.com/stefanhuber Stefan Huber

    How do you do the unit or functional testing? Twitter uses that for their app, so the post is misleading! A twitter app without testing is probably malware…

  • Vincent Bergeron

    I think he uses old code for newer jsSHA library… I get the same error

  • Francesco Mussi

    After the authentication I get the ion-refresher keep spinning and this error in the console: HomePage ionViewWillEnter error: undefined. Do you know why?

  • Tyago Goulart Nunes

    I build and test with .apk in my device, but when login with twitter, the app return to login page… In twitter, my config say i accept my app normally.

    What could be wrong?

  • Aaron

    When I try to post a tweet, I’m getting a message:

    Response with status: 401 Authorization Required for URL: http:localhost:4400/xhr_proxy?rurl=https%3A//api.twitter.com/1.1/statuses/update.json%3Fstatus%3Dtest

    I’m using Visual Studio and the app I created doesn’t have an AndroidManifest.xml file so I wasn’t able to add the API key. Any Idea?

  • akash

    How can I share twitter card (summary card) instead of just text?
    I have one webpage which is having all the metatag required by twitter