Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Net;
- using System.Threading.Tasks;
- using Microsoft.Azure.WebJobs;
- namespace Bot
- {
- // To learn more about Microsoft Azure WebJobs SDK, please see http://go.microsoft.com/fwlink/?LinkID=320976
- class Program
- {
- static string token = "хуй";
- static string apiurl = "https://api.vk.com/method/";
- // Please set the following connection strings in app.config for this WebJob to run:
- // AzureWebJobsDashboard and AzureWebJobsStorage
- static void Main()
- {
- var host = new JobHost();
- // The following code ensures that the WebJob will be running continuously
- string url = apiurl + "status.set?" + "text=helloworld" + "&access_token=" + token;
- //string url = "https://oauth.vk.com/access_token?client_id=5578051&client_secret=хуй&redirect_uri=https://oauth.vk.com/blank.html&code=" + "хуй";
- HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
- HttpWebResponse response = (HttpWebResponse)request.GetResponse();
- var stream = response.GetResponseStream();
- byte[] buf = new byte[1000];
- stream.Read(buf, 0, 1000);
- var str = System.Text.Encoding.Default.GetString(buf);
- Console.WriteLine(str);
- System.Threading.Thread.Sleep(5 * 60 * 1000);
- host.RunAndBlock();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement