Postgresql Rails 3.2设计Omniauth facebook和考拉

Postgresql Rails 3.2设计Omniauth facebook和考拉,postgresql,facebook-graph-api,ruby-on-rails-3.2,omniauth,koala-gem,Postgresql,Facebook Graph Api,Ruby On Rails 3.2,Omniauth,Koala Gem,我正在尝试将考拉整合到Desive omniauth facebook应用程序中。由于某些原因,我无法张贴到用户的墙上。我创建了第二个应用程序,它不使用Desive和all works,我意识到唯一的区别是,oauth\u expires\u在我在保存facebook返回的oauth\u expires\u时遇到问题 # Facebook def self.find_for_facebook_oauth(auth, signed_in_resource=nil) user = U

我正在尝试将考拉整合到Desive omniauth facebook应用程序中。由于某些原因,我无法张贴到用户的墙上。我创建了第二个应用程序,它不使用Desive和all works,我意识到唯一的区别是,oauth\u expires\u在我在保存facebook返回的oauth\u expires\u时遇到问题

  # Facebook
  def self.find_for_facebook_oauth(auth, signed_in_resource=nil)
    user = User.where(:provider => auth.provider, :uid => auth.uid).first
          unless user
            user = User.create(  name:auth.extra.raw_info.name,
                                 provider:auth.provider,
                                 uid:auth.uid,
                                 email:auth.info.email,
                                 image:auth.info.image,
                                 oauth_token:auth.credentials.token,
                                 password:Devise.friendly_token[0,20]
                                 )
          end
        user
  end
我试过了

#oauth_expires_at:auth.credentials.expires_at.to_datetime,
#oauth_expires_at:auth.Time.at(auth['credentials'].expires_at),
#oauth_expires_at:Time.at(@auth[:credentials][:expires_at]).to_datetime,

如何将facebook时间响应转换为PostgreSQL日期时间格式。请帮忙。或者这有关系吗?

看起来,
oauth\u expires\u at
根本没有引起问题。我被纠正了