{"id":186,"date":"2013-03-03T10:24:59","date_gmt":"2013-03-03T10:24:59","guid":{"rendered":"http:\/\/composer.io\/site\/?p=186"},"modified":"2013-05-19T20:15:34","modified_gmt":"2013-05-19T20:15:34","slug":"vk-com","status":"publish","type":"post","link":"https:\/\/composer.io\/site\/2013\/03\/03\/vk-com\/","title":{"rendered":"VK.com"},"content":{"rendered":"<p>An enthusiastic user sent us a very nice email, amongst other things, asking for Composer to support <a title=\"VK.com - European social network with &gt;100m users, mostly in Russia, and a stupid API policy\" href=\"http:\/\/vk.com\/\" target=\"_blank\">VK.com<\/a>. As it was such a nice email, I thought I&#8217;d have a look and see if we could add support for VK.com. There is an API, so that&#8217;s the first step. I started off trying to write to the API directly, but there were a few issues. So then I decided to use a <a title=\"A PHP wrapper for the VK.com api on github\" href=\"https:\/\/github.com\/vladkens\/VK\" target=\"_blank\">VK wrapper<\/a>. Then I got a strange error message:<\/p>\n<p><code>Permission to perform this action is denied for non-standalone applications: you should request token using blank.html page<\/code><\/p>\n<p>I couldn&#8217;t make sense of it. I tried changing various things, spent a few hours tinker with it. Finally, I figured it out. The key is on <a title=\"Advanced API methods are only available to desktop or standalone applications, bah bloody humbug\" href=\"http:\/\/vk.com\/developers.php?oid=-17680044&amp;p=Advanced_API_Methods\" target=\"_blank\">this page<\/a>. Bottom line, the VK.com API only allows &#8220;desktop or standalone&#8221; applications to post content. In other words, because we&#8217;re a web based application, we&#8217;re forbidden from posting content.<\/p>\n<p>There is a hack to get around this. The hack requires the user to copy and paste a code from a page which says &#8220;\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043d\u0435 \u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0430\u0434\u0440\u0435\u0441\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0434\u043b\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u0441\u0430\u0439\u0442\u043e\u0432. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0412\u0430\u0448\u0435\u043c\u0443 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0443.&#8221; I know, right! Google helpfully translated this as &#8220;Please do not copy the data from the address bar to third-party sites. So you may lose access to your account.&#8221;<\/p>\n<p>So, by copying and pasting my token I was able to get the API working, but it&#8217;s explicitly forbidden. Unfortunately, for Composer, that means as far as I can see, there&#8217;s no way for us to support VK.com. Which is a shame, there are 100m users on VK.com.<\/p>\n<p>Maybe when Composer is bigger, when we hit the outrageous Twitter 100k limit, then we can open channels with VK.com and perhaps negotiate access to their API to let users post content to their service more easily. If you know anyone at VK.com and can work this angle on our behalf, please do so. We&#8217;ve got all the code ready, all we need is for VK.com to actually let us post.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>An enthusiastic user sent us a very nice email, amongst other things, asking for Composer to support VK.com. As it was such a nice email, I thought I&#8217;d have a look and see if we could add support for VK.com. There is an API, so that&#8217;s the first step. I started off trying to write [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[33,41],"class_list":["post-186","post","type-post","status-publish","format-standard","hentry","category-announcements","tag-api","tag-vk-com"],"_links":{"self":[{"href":"https:\/\/composer.io\/site\/wp-json\/wp\/v2\/posts\/186"}],"collection":[{"href":"https:\/\/composer.io\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/composer.io\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/composer.io\/site\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/composer.io\/site\/wp-json\/wp\/v2\/comments?post=186"}],"version-history":[{"count":4,"href":"https:\/\/composer.io\/site\/wp-json\/wp\/v2\/posts\/186\/revisions"}],"predecessor-version":[{"id":189,"href":"https:\/\/composer.io\/site\/wp-json\/wp\/v2\/posts\/186\/revisions\/189"}],"wp:attachment":[{"href":"https:\/\/composer.io\/site\/wp-json\/wp\/v2\/media?parent=186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/composer.io\/site\/wp-json\/wp\/v2\/categories?post=186"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/composer.io\/site\/wp-json\/wp\/v2\/tags?post=186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}