リンクされたgemをオムニ認証可能なデバイスRailsプラットフォームと統合するために、このリンクをたどろうとしています。
http://renderedtext.com/blog/2011/08/17/how-to-use-linkedin-gem-with-omniauth/
2つの簡単な質問!
一番下の「class LinkedinFactory」ファイルはアプリ内のどこにあり、何と呼ばれますか? 上記のリンクにディレクトリ/ファイル名が表示されません。
現在、LinkedIn からログインしようとすると、次のように言ってアプリケーションが失敗します。
OmniauthCallbacksController#linkedin の NoMethodError
nil:NilClass の未定義メソッド「create_linkedin_connection」
「create_linkedin_connection」メソッドをどこでどのように定義しますか? omniauth_callbacks.rb コントローラーの 3 行目で呼び出されます。
def linkedin
omniauth_hash = env["omniauth.auth"]
current_user.create_linkedin_connection(
:token => omniauth_hash["extra"]["access_token"].token,
:secret => omniauth_hash["extra"]["access_token"].secret,
:uid => omniauth_hash["uid"]
)
redirect_to root_path, :notice => "You've successfully connected your LinkedIn account."
end
ありがとうございました!