vk

spring oauth2 authorization code flow , configuration for VK (Vkontakte)

风流意气都作罢 提交于 2019-12-06 08:58:44
问题 I'm using social network Vkontakte as Oauth2 authorization server. So I have several steps: 1) get code with request with request_type=code 2) get accessToken when I send request to access token uri So I want to use Spring Oauth2, but I should get authorization code first, then access token, i've tried to add to application.yml : authorized-grant-types: authorization_code it's my application.yml: security: oauth2: client: clientId: [clientId] clientSecret: [clientSecret] accessTokenUri: https

Vkontakte API using OAuth does not work with Captcha

限于喜欢 提交于 2019-12-05 11:19:31
问题 Vkontakte API rejects requests with Captcha. Here is the example what I do. After the third request I get: Captcha error (14) - Captcha needed. According to documentation it's sufficient to add captcha_sid and captcha_key parameters to the original requests and repeat the request. But the response is still Captcha error (14) . Is it possible to work with Captcha and OAuth in Vkontakte API? 回答1: Captcha error Error code: 14 Error text: Captcha needed and captcha confirmation is required, when:

How to insert content script in google chrome extension when page was changed via history.pushState?

你离开我真会死。 提交于 2019-12-05 07:44:31
I'm creating a small google chrome extension for website, and I want to change some html on particular pages. The problem is that website load his content via ajax, and heavy use history.pushState API. So, I added this thing to manifest: "content_scripts": [ { "matches": ["http://vk.com/friends"], "js": ["js/lib/jquery.min.js", "js/friends.js"], }, ] Everything works fine when I'm opening page first time or reloading it. But when I'm navigating between website pages, chrome don't insert my scripts on "/friends" page. I think this happening because the URL actually don't changing. They use

How to open VKontakte app with a specific friend?

帅比萌擦擦* 提交于 2019-12-05 01:40:36
问题 Background In order to open Facebook app with a specific Facebook friend, you can use this intent: final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(String.format("fb://profile/%s", friendId))); A similar solution is found for LinkedIn: final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(String.format("linkedin://profile/%s", friendId))); I think the next one will work for Google Plus (didn't test it, but it seems promising) : final Intent intent =new Intent(Intent

spring oauth2 authorization code flow , configuration for VK (Vkontakte)

喜欢而已 提交于 2019-12-04 12:19:41
I'm using social network Vkontakte as Oauth2 authorization server. So I have several steps: 1) get code with request with request_type=code 2) get accessToken when I send request to access token uri So I want to use Spring Oauth2, but I should get authorization code first, then access token, i've tried to add to application.yml : authorized-grant-types: authorization_code it's my application.yml: security: oauth2: client: clientId: [clientId] clientSecret: [clientSecret] accessTokenUri: https://oauth.vk.com/access_token userAuthorizationUri: https://oauth.vk.com/authorize tokenName: access

Vkontakte API using OAuth does not work with Captcha

五迷三道 提交于 2019-12-03 22:03:52
Vkontakte API rejects requests with Captcha. Here is the example what I do. After the third request I get: Captcha error (14) - Captcha needed. According to documentation it's sufficient to add captcha_sid and captcha_key parameters to the original requests and repeat the request. But the response is still Captcha error (14) . Is it possible to work with Captcha and OAuth in Vkontakte API? Captcha error Error code: 14 Error text: Captcha needed and captcha confirmation is required, when: action (e.g. sending a message) is performed too frequently , an API request may return " Captcha needed "

How to open VKontakte app with a specific friend?

隐身守侯 提交于 2019-12-03 16:46:06
Background In order to open Facebook app with a specific Facebook friend, you can use this intent: final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(String.format("fb://profile/%s", friendId))); A similar solution is found for LinkedIn: final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(String.format("linkedin://profile/%s", friendId))); I think the next one will work for Google Plus (didn't test it, but it seems promising) : final Intent intent =new Intent(Intent.ACTION_VIEW, Uri.parse(String.format("https://plus.google.com/%s/posts", friendId))); The question I've

insert content script when page was changed by history.pushState and ajax call

懵懂的女人 提交于 2019-12-01 17:55:11
I've faced with the problem with inserting content script into the page which was changed by history.pushState and ajax call. I've found the similar topic at stackoverflow, but that solution doesn't work for me (that solution was in using of chrome.webNavigation.onHistoryStateUpdated and "popstate" event ). Here is a fragment of my manifest: "content_scripts": [ { "matches": ["https://vk.com/audios*", "https://vk.com/al_audio.php*"], "js": ["jquery-2.1.4.min.js", "getListOfSongs.js"] } ] chrome.webNavigation.onHistoryStateUpdated works only if i navigate to the another page, if i navigate to

insert content script when page was changed by history.pushState and ajax call

自闭症网瘾萝莉.ら 提交于 2019-12-01 17:21:50
问题 I've faced with the problem with inserting content script into the page which was changed by history.pushState and ajax call. I've found the similar topic at stackoverflow, but that solution doesn't work for me (that solution was in using of chrome.webNavigation.onHistoryStateUpdated and "popstate" event ). Here is a fragment of my manifest: "content_scripts": [ { "matches": ["https://vk.com/audios*", "https://vk.com/al_audio.php*"], "js": ["jquery-2.1.4.min.js", "getListOfSongs.js"] } ]

Deserialize JSON when type can be different

点点圈 提交于 2019-11-28 14:08:14
I`m working with VK API. Sometimes server can return empty array instead of object, for example: personal: [] //when it is empty or personal: { religion: 'Нет', smoking: 1, alcohol: 4 } //when not empty. I`m deserializing most of json with JsonConvert.DeserializeObject, and this part of json with MainObject = ((MainObject["response"].GetObject())["user"].GetObject())["personal"].GetObject(); try { Convert.ToByte(MainObject["political"].GetNumber(); } catch {} But it makes app works slowly when it`s handling a lot of exeptions. And just now i realised that here are some more fields that might