Esempio n. 1
0
        private async void HandleToken(string accesstoken)
        {
            Token = accesstoken;
            await GET_Request($"{APIlink}users.get?access_token={Token}&v={APIversion}");

            dynamic obj    = JObject.Parse(GET_Response);
            var     fields = obj.response[0];

            UserID = fields.id;
            await FetchFriends();
            await GET_Request($"{APIlink}messages.getLongPollServer?need_pts=1&lp_version=2&access_token={Token}&v={APIversion}");

            pollresponse = JsonConvert.DeserializeObject <PollServerResponse>(GET_Response);
            LongPoll();
        }
Esempio n. 2
0
        private async void HandleToken(string accesstoken)
        {
            Token = accesstoken;
            Debug.WriteLine(Token);
            await POST_Request($"users.get?");

            dynamic obj    = JObject.Parse(Response);
            var     fields = obj.response[0];

            UserID = fields.id;
            await FetchFriends();
            await GET_Request($"messages.getLongPollServer?need_pts=1&lp_version=2&");

            pollresponse = JsonConvert.DeserializeObject <PollServerResponse>(Response);
            LongPoll();
        }