Devise を使用して Rails アプリケーション (4.1.10) をセットアップしています。このデバイスガイドを使用して、OmniAuth Facebook 統合を追加しています: https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview
必要な設定はすべて完了したと思います ( app_id と secret を ENV 変数に入れる必要があることは承知しています - これが機能したら次に進みます)。
https://www.facebook.com/dialog/oauth?client_id=&display=popup&redirect_uri=http%3A%2F%2Fwww.clazzoo.com%2Fusers%2Fauth%2Ffacebook%2Fcallback&response_type=code&scope=email%2Cuser_birthday%2Cread_stream&state=b43008b5d8e714e91ac37b4410f7758655efecbca7bfe98e
Warning
The parameter app_id is required
設定はここにあります:
# Use this hook to configure devise mailer, warden hooks and so forth.
# Many of these configuration options can be set straight in your model.
Devise.setup do |config|
...
...
config.omniauth :facebook, "1602932433319776", "7221cf917c6e55ba68c8e81145994481",
:scope => 'email,user_birthday,read_stream',
:display => 'popup'
config.omniauth :stripe_connect,
Settings.stripeConnectClientID,
Settings.stripeSecretKey,
:scope => 'read_write',
:stripe_landing => 'register'
end
User モデルには omniauthable セットがあります。
class User < ActiveRecord::Base
# Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable and :omniauthable
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable, :confirmable,
:omniauthable, :omniauth_providers => [:facebook]
では、リンクをクリックすると、適切な ID が見つからないのはなぜですか?