From fc4ca4545540ba1f35e4e7ad01646edf11199b4e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 7 Jan 2014 12:31:01 +0000 Subject: ability to set the alternative VK domain git-svn-id: http://svn.miranda-ng.org/main/trunk@7531 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/VKontakte/src/vk_queue.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'protocols/VKontakte/src/vk_queue.cpp') diff --git a/protocols/VKontakte/src/vk_queue.cpp b/protocols/VKontakte/src/vk_queue.cpp index b3ee1e9195..0b4c48140a 100644 --- a/protocols/VKontakte/src/vk_queue.cpp +++ b/protocols/VKontakte/src/vk_queue.cpp @@ -64,7 +64,7 @@ AsyncHttpRequest* CVkProto::PushAsyncHttpRequest(int iRequestType, LPCSTR szUrl, CMStringA url; if (*szUrl == '/') { // relative url leads to a site - url = ((bSecure) ? "https://" : "http://") + CMStringA(VK_API_URL); + url = ((bSecure) ? "https://api." : "http://api.") + CMStringA(m_baseDomain); url += szUrl; pReq->bIsMainConn = true; } @@ -105,11 +105,12 @@ void CVkProto::WorkerThread(void*) // try to receive a response from server RetrieveMyInfo(); else { + CMStringA redirectUrl; redirectUrl.Format("http://api.%s/blank.html", m_baseDomain); // Initialize new OAuth session HttpParam params[] = { { "client_id", VK_APP_ID }, { "scope", "friends,photos,audio,video,wall,messages,offline" }, - { "redirect_uri", VK_REDIRECT_URL }, + { "redirect_uri", redirectUrl }, { "display", "wap" }, { "response_type", "token" } }; -- cgit v1.2.3