我正在关注235- devise -and-omniauth-revised的railscasts.第一步是设置推特应用凭据.我发现有
消费者密钥/消费者秘密
并且
访问令牌/访问令牌密钥
我的问题很简单,为什么有两对凭证,什么是使用它们的正确方案.
我注意到这是另一个相同的问题,这没有多大帮助.
好的,那么,据我所知,consumer_key对是服务器.access_key对用于客户端.检查以下评论.如果您有其他理解,请添加您的答案.
我有两个型号
# == Schema Information
#
# Table name: answers
#
# id :integer not null, primary key
# content :text
# question_id :integer
# accept :boolean
# created_at :datetime not null
# updated_at :datetime not null
# user_id :integer
#
class Answer < ActiveRecord::Base
attr_accessible :accept, :content, :question_id, :user
belongs_to :question
belongs_to :user
delegate :username, to: :user, allow_nil: true, prefix: 'owner'
end
Run Code Online (Sandbox Code Playgroud)
和问题
# == Schema Information
#
# Table name: questions
#
# id :integer not null, primary …Run Code Online (Sandbox Code Playgroud)