Script for maintaining session from browser for facebook automation
First, you need to get cookies from your web browser.
To do that, I would recommend cookies.txt
After you got your cookies, you should run:
php addAccount.php
Now, paste cookies and pres Enter
twice!
To keep session in working order make sure you do not log out in browser or simply delete cookies in browser.
<?php
require_once("./vendor/autoload.php");
require_once("./Config.php");
require_once("./Parser.php");
$config = new Config;
$parser = new Parser($config->get("accounts"));
echo $parser->get("https://www.facebook.com/");
If you prefer to run CLI menu, you can do so by:
php index.php
php checkAccounts.php
If problem stays, just delete that account from config.json and readd it.