Answer the question
In order to leave comments, you need to log in
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
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
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question