dongqiao9583 2015-09-22 08:44
浏览 30
已采纳

Facebook登录Laravel 5

I have registered my application with facebook, is using the Laravel socialite package.

I'm unable to find a solution regarding how I should set up Facebook in the services.php file.

services.php

'facebook' => [
    'client_id' => env('FB_APP_ID'),
    'client_secret' => env('FB_APP_SECRET'),
    'redirect' => env(''), //???
],

Before I proceed I want to know which keys and values I need to provide in the facebook array and where I can find them. The first two, I believe, are correct but I'm uncertain about any other.

Thanks for your help.

  • 写回答

2条回答 默认 最新

  • doubairan4213 2015-09-22 08:50
    关注

    You may find this article helpful, it details how to implement the Socialite package quite well.

    As for your setup, it all looks fine for the ID side of things, however the redirect should be set to the call-back URL you wish to use. E.g www.yoursite.com/account/facebook.

    You can then pick this up in your routes.php file and direct it to a controller function.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥20 机器学习能否像多层线性模型一样处理嵌套数据
  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效