PGBrowser Получить токен от Facebook

Переписываем этот проект: https://github.com/tarraschk/TinderAutoLike в PHP с использованием PGBrowser.
Мой код:

<?php
require 'pgbrowser.php';

$b = new PGBrowser();
$tinder_url = "https://www.facebook.com/v2.6/dialog/oauth?redirect_uri=fb464891386855067%3A%2F%2Fauthorize%2F&scope=user_birthday,user_photos,user_education_history,email,user_relationship_details,user_friends,user_work_history,user_likes&response_type=token%2Csigned_request&client_id=464891386855067";
$email = "***Email***";
$pass = "***Password***";
$page = $b->get($tinder_url);
$form = $page->form(0);
$form->set('email',$email);
$form->set('pass',$pass);
$page = $form->submit();
$submit = $page->form(0);
$page = $submit->submit();
var_dump($page);

?>

Проблема: не возвращается access_token

1

Решение

Вот ответ

<?php
require 'pgbrowser.php';

$b = new PGBrowser();
$tinder_url = "https://www.facebook.com/v2.6/dialog/oauth?redirect_uri=fb464891386855067%3A%2F%2Fauthorize%2F&scope=user_birthday,user_photos,user_education_history,email,user_relationship_details,user_friends,user_work_history,user_likes&response_type=token%2Csigned_request&client_id=464891386855067";
$email = ""; //email here
$pass = ""; //pass here
$page = $b->get($tinder_url);
$form = $page->forms(0);
$form->set('email',$email);
$form->set('pass',$pass);
$page = $form->submit();
$submit = $page->forms(0);
$page = $submit->submit();
$page =  var_export($page,true);
$access_token = explode("access_token=",$page);
$access_token = explode("&expires_in",$access_token[1]);
echo $access_token[0];

?>
-1

Другие решения

Других решений пока нет …

По вопросам рекламы [email protected]