首先讓編輯您的/app/anvar/config/routes.php
看起來是這樣的:
<?php
return array(
'index' => 'login',
'login' => 'login/{provider}',
'endpoint' => 'after/facebook',
/* note that endpoint can not be the same pattern as login
for example if I made it login/after it would go back to the login page with 'after' as $provider
*/
);
在app/storage/logs/
創建一個文件,並將其命名爲hauth_debug_file.txt然後 以下內容添加到您的/config/packages/anvard/hybridauth.php
"debug_mode" => true,
"debug_file" =>"D:\www\Dev\bp4\app\storage\logs\hauth_debug_file.txt",
//change this path with yours
這會在文件中調試很多好的信息,然後你可以共享文件來幫助解決問題。所以,你的文件看起來是這樣的:
<?php
return array(
// 'base_url' => URL::route(Config::get('anvard::routes.login')),
'providers' => array (
'Facebook' => array (
'enabled' => true,
'keys' => array ('id' => 'yourr-key', 'secret' => 'your-secret'),
//'scope' => Input::get('permission_scope','email, user_about_me, user_birthday, user_hometown, user_likes, user_interests, user_location'),
),
'Twitter' => array (
'enabled' => false,
'keys' => array ('key' => '', 'secret' => '')
),
'LinkedIn' => array (
'enabled' => false,
'keys' => array ('key' => '', 'secret' => '')
),
),
"debug_mode" => true,
"debug_file" =>"D:\www\Dev\bp4\hauth_debug_file.txt",
);
另外,您可以通過設置這個配置配置::你/app/start/local.php 也設置/ anvard/src目錄/ Atticmedia/Anvard /路線.PHP我覺得它工作得更好,如果你改變return Redirect::back();
到return Redirect::to(Config::get('anvard::routes.endpoint'));
我也只好圍繞線230編輯Atticmedia/Anvard/Anvard.php到
$profile = new $ProfileModel();
foreach ($attributes as $key => $v) {
$profile->$key = $v;
}
$profile = $this->applyAdapterProfileToExistingProfile($adapter_profile, $profile);