zinenko/vk-ruby — Issue #3: Doesn't work photos.getComments metod
Author: targence
Created: 2011-12-20 05:27:47+00:00
State: open

require 'vk-ruby'

token = 'your token' #######

@app = VK::Standalone.new(:app_id => 'your id') ########
@app.access_token = token

@group_name = 'bigbang_vk'
@group_id = (0-@app.groups.getById(:gid => @group_name)[0]["gid"])

photos = @app.photos.getAll(:owner_id => @group_id, :count => 100)
pid = photos[2]["pid"]

likes_data = @app.likes.getList(:type => "photo", :owner_id => @group_id, :item_id => pid, :filter => "likes", :count => 100, :offset => 0)

comments_data = @app.photos.getComments(:owner_id => @group_id, :pid => pid, :count => 100, :offset => 0)

###########

$VK::VkException: Error 20 in `photos.getComments' - Permission to perform this action is denied for non-standalone applications