/ / Loutavel - laravel-5.2, goutte में goutte का उपयोग कर फेसबुक में कैसे लॉगिन करें

Garte में laravel - laravel-5.2, goutte का उपयोग कर फेसबुक में कैसे लॉगिन करें

मैं लारवेल में गौटे का उपयोग कर फेसबुक में लॉगिन करना चाहता हूं। उनका जिथब में लॉगिन करने का दस्तावेज़ है, लेकिन मैं फेसबुक में लॉगिन करना चाहता हूं और पेज पर उपलब्ध व्यक्ति का पूरा नाम प्राप्त करना चाहता हूं। मैं क्या कोशिश कर रहा हूँ

$crawler = $client->request("GET", "https://www.facebook.com");
$form = $crawler->selectButton("Log In")->form();

$crawler = $client->submit($form, array("email" => "fabpot", "pass" => "xxxxxx"));
// submit that form
$crawler = $client->submit($form);
echo $crawler->html();

return $this->render("scraperBundle:Thing:index.html.twig");

लेकिन मुझे त्रुटि मिल रही है:

InvalidArgumentException in Crawler.php line 822:
The current node list is empty.

कृपया मेरी मदद करें।

उत्तर:

जवाब के लिए 0 № 1

कोशिश करो यह काम करेगा

$client = new Client();
$crawler = $client->request("GET", "https://en-gb.facebook.com/login/");
$form = $crawler->selectButton("Log In")->form();
$crawler = $client->submit($form, array("email" => "email", "pass" => "pass"));
$crawler->filter(".flash-error")->each(function ($node) {
print $node->text()."n";
});
echo $crawler->html();