เบื้องต้นลองค้นหาแล้วแต่ไม่เจอรูปแบบการเรียกใช้งานที่อยู่นอกไฟล์ เกี่ยวกับ class ที่มีการทำงาน login ครับ
โค้ด: เลือกทั้งหมด
require_once('phpbb/auth/provider/oauth/oauth.php');
require_once('phpbb/auth/provider/oauth/token_storage.php');
// สร้างอ็อบเจกต์ OAuth
$oauth = new \phpbb\auth\provider\oauth\oauth(
$config,
$db,
$db_auth,
$dispatcher,
$language,
$request,
$service_providers,
$user,
$oauth_token_table,
$oauth_state_table,
$oauth_account_table,
$users_table,
$root_path,
$php_ext
);
โค้ด: เลือกทั้งหมด
[phpBB Debug] PHP Warning: in file [ROOT]/ext/mindphp/m_register_facebook/controller/form.php on line 122: Undefined variable $config
[phpBB Debug] PHP Warning: in file [ROOT]/ext/mindphp/m_register_facebook/controller/form.php on line 122: Undefined variable $db
[phpBB Debug] PHP Warning: in file [ROOT]/ext/mindphp/m_register_facebook/controller/form.php on line 122: Undefined variable $db_auth
[phpBB Debug] PHP Warning: in file [ROOT]/ext/mindphp/m_register_facebook/controller/form.php on line 122: Undefined variable $dispatcher
[phpBB Debug] PHP Warning: in file [ROOT]/ext/mindphp/m_register_facebook/controller/form.php on line 122: Undefined variable $language
[phpBB Debug] PHP Warning: in file [ROOT]/ext/mindphp/m_register_facebook/controller/form.php on line 122: Undefined variable $request
[phpBB Debug] PHP Warning: in file [ROOT]/ext/mindphp/m_register_facebook/controller/form.php on line 122: Undefined variable $service_providers
[phpBB Debug] PHP Warning: in file [ROOT]/ext/mindphp/m_register_facebook/controller/form.php on line 122: Undefined variable $user
[phpBB Debug] PHP Warning: in file [ROOT]/ext/mindphp/m_register_facebook/controller/form.php on line 122: Undefined variable $oauth_token_table
[phpBB Debug] PHP Warning: in file [ROOT]/ext/mindphp/m_register_facebook/controller/form.php on line 122: Undefined variable $oauth_state_table
[phpBB Debug] PHP Warning: in file [ROOT]/ext/mindphp/m_register_facebook/controller/form.php on line 122: Undefined variable $oauth_account_table
[phpBB Debug] PHP Warning: in file [ROOT]/ext/mindphp/m_register_facebook/controller/form.php on line 122: Undefined variable $users_table
[phpBB Debug] PHP Warning: in file [ROOT]/ext/mindphp/m_register_facebook/controller/form.php on line 122: Undefined variable $root_path
[phpBB Debug] PHP Warning: in file [ROOT]/ext/mindphp/m_register_facebook/controller/form.php on line 122: Undefined variable $php_ext
Fatal error: Uncaught TypeError: phpbb\auth\provider\oauth\oauth::__construct(): Argument #1 ($config) must be of type phpbb\config\config, null given, called in C:\xampp8-1\htdocs\phpBB3_f2\ext\mindphp\m_register_facebook\controller\form.php on line 121 and defined in C:\xampp8-1\htdocs\phpBB3_f2\phpbb\auth\provider\oauth\oauth.php:98 Stack trace: #0 C:\xampp8-1\htdocs\phpBB3_f2\ext\mindphp\m_register_facebook\controller\form.php(121): phpbb\auth\provider\oauth\oauth->__construct(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) #1 C:\xampp8-1\htdocs\phpBB3_f2\vendor\symfony\http-kernel\HttpKernel.php(151): mindphp\m_register_facebook\controller\form->login('login') #2 C:\xampp8-1\htdocs\phpBB3_f2\vendor\symfony\http-kernel\HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(phpbb\symfony_request), 1) #3 C:\xampp8-1\htdocs\phpBB3_f2\app.php(35): Symfony\Component\HttpKernel\HttpKernel->handle(Object(phpbb\symfony_request)) #4 {main} thrown in C:\xampp8-1\htdocs\phpBB3_f2\phpbb\auth\provider\oauth\oauth.php on line 98
พอมีวิธีใช้งานไหมครับ ต้องการเขียน login facebook แยกจากตัวหลักของ phpBB แต่หา class และวิธีเรียกใช้ไม่เจอครับ