void Awake()
    {
        SPTwitter.Init(TWITTER_CONSUMER_KEY, TWITTER_CONSUMER_SECRET);

        SPTwitter.twitter.addEventListener(TwitterEvents.AUTHENTICATION_SUCCEEDED, OnAuth);
        SPTwitter.twitter.addEventListener(TwitterEvents.TWITTER_INITED, OnInit);

        SPTwitter.twitter.addEventListener(TwitterEvents.POST_SUCCEEDED, OnPost);
        SPTwitter.twitter.addEventListener(TwitterEvents.POST_FAILED, OnPostFailed);

        SPTwitter.twitter.addEventListener(TwitterEvents.USER_DATA_LOADED, OnUserDataLoaded);
        SPTwitter.twitter.addEventListener(TwitterEvents.USER_DATA_FAILED_TO_LOAD, OnUserDataLoadFailed);


        style = new GUIStyle();
        style.normal.textColor = Color.white;
        style.fontSize         = 18;
        style.fontStyle        = FontStyle.BoldAndItalic;
        style.alignment        = TextAnchor.UpperLeft;
        style.wordWrap         = true;


        style2 = new GUIStyle();
        style2.normal.textColor = Color.white;
        style2.fontSize         = 12;
        style2.fontStyle        = FontStyle.Italic;
        style2.alignment        = TextAnchor.UpperLeft;
        style2.wordWrap         = true;
    }
Esempio n. 2
0
    void Awake()
    {
        SPTwitter.Init(TWITTER_CONSUMER_KEY, TWITTER_CONSUMER_SECRET);

        SPTwitter.twitter.addEventListener(TwitterEvents.AUTHENTICATION_SUCCEEDED, OnAuth);
        SPTwitter.twitter.addEventListener(TwitterEvents.TWITTER_INITED, OnInit);

        SPTwitter.twitter.addEventListener(TwitterEvents.POST_SUCCEEDED, OnPost);
        SPTwitter.twitter.addEventListener(TwitterEvents.POST_FAILED, OnPostFailed);

        SPTwitter.twitter.addEventListener(TwitterEvents.USER_DATA_LOADED, OnUserDataLoaded);
        SPTwitter.twitter.addEventListener(TwitterEvents.USER_DATA_FAILED_TO_LOAD, OnUserDataLoadFailed);
    }