Answer the question
In order to leave comments, you need to log in
What's wrong with facebook api authorization?
Hello. You need to post messages in the group. I'm trying to get an access_token I
created an application, a screenshot of the application settings
and a code from off sources, for example from here
<?
// старт сессии необходим библиотеке
session_start();
require_once __DIR__ . '/vendor/autoload.php';
// App ID и App Secret из настроек приложения
$app_id = "872746109905037";
$app_secret = "0432525a87e6350cb5d7fa3cad750e98";
// ссылка на страницу возврата после авторизации
// домен должен совпадать с указанным в настройках приложения
$callback = "http://mod.bfdev.ru/login-callback.php";
$fb = new Facebook\Facebook([
'app_id' => $app_id,
'app_secret' => $app_secret,
'default_graph_version' => 'v2.10',
]);
$helper = $fb->getRedirectLoginHelper();
$permissions = ['email', 'user_likes']; // optional
$loginUrl = $helper->getLoginUrl($callback, $permissions);
echo '<a href="' . $loginUrl . '">Log in with Facebook!</a>';
Answer the question
In order to leave comments, you need to log in
did not complete everything.
You need to click on the plus sign in Products and add Login via FB there and configure everything there
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question