So far this app i have initializes the login to twitter function as soon as 
I load the page that includes it. Rather than that I am trying to set it up 
so that I have to click something in order to start the process. here is my 
current code:

 $scope.openTwitterLogin = function () {
                $scope.opent = false;  //created this to experiment in ways to 
do it.
        };
function initializeController() {

                    if (ionic.Platform.isAndroid()){
                    if (!window.TW_initialized) {

                        OpenTW.init().then(
                            function () {
                                console.log("login twitter");
                                window.TW_initialized = true;
                                getLatestTweet();
                            },
                            function (error) {
                                console.log('twitter login failed ', error);
                                window.TW_initialized = false;
                            });
                    } else {
                        getLatestTweet();
                    }

                } 

                else {
                    getLatestTweet();
                }
    initializeController();

and here is the html side i created:

 <div class="item item-text-wrap twitter-msg">
            <div>{{recentTweet.text}}</div>
            <div ng-hide="recentTweet.text"> <button 
ng-click="openTwitterLogin">Click to get twitter</button></div>
            <span style="font-size: smaller" 
am-time-ago="recentTweet.created_at"></span> 
            <span style="font-size: smaller" 
ng-hide="recentTweet.created_at"></span>
        </div>

Any advice, help would be wonderful!

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to