1

我正在尝试使用linkedin-oauth2 gem 添加共享并出现错误

Faraday::ClientError: the server responded with status 400

我也尝试过 irb 但仍然遇到同样的错误。我为我的访问令牌设置了 w_share 权限,但我不知道为什么会收到此错误。这是 m 在我的控制器方法中所做的一个片段->

def post_on_linkedin
  user = User.find_by_id(session[:user_id])
  @client = LinkedIn::API.new(user.token)
  @client.add_share(content: "hello")
  redirect_to social_media_linkedin_index_path
end

请告诉我我的语法是否有问题或其他任何问题,并请提供将“add_share”方法与所有其他选项一起使用的语法。谢谢

4

0 回答 0