A
A
Alexander2014-04-24 00:15:50
Ruby on Rails
Alexander, 2014-04-24 00:15:50

How to solve the problem with posting in the social. networks from def create?

I found an interesting gem 'social_poster', it posts to 4 popular social networks. networks, I decided to check with VK, but an error comes out (Error 10 in "wall.post" : Internal server error: could not get application), the token and id of the public are correct. Help, please, to understand, in rails recently.
Here is the code:
social_poster.rb

SocialPoster.setup do |config|
  config.fb = {
    access_token: 'ACCESS_TOKEN'
  }

  config.vk = {
    access_token: 'RNtC0FB1J3q9EBycxXQV'
  }
end

controller
def create
    @post = Post.new(post_params)
    SocialPoster.write(:vk, '#{@post.title}', nil, owner_id: '54095684')
    if @post.save
      redirect_to @post
    else
      render 'new'
    end
  end

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
rsludge, 2014-04-24
@rsludge

In VK, posting through the API is possible only through the application, it is impossible through a third-party site.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question