phpfbsession

Script for maintaining session from browser for facebook automation

Adding session

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:

1
php addAccount.php

Now, paste cookies and pres Enter twice!

Keeping session in working order?

To keep session in working order make sure you do not log out in browser or simply delete cookies in browser.

How to get something from facebook?

1
2
3
4
5
6
7
8
9
10
11
<?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/");

CLI menu

If you prefer to run CLI menu, you can do so by:

1
php index.php

Troubleshooting

I have problem with session, what do I do?

1
php checkAccounts.php

If problem stays, just delete that account from config.json and readd it.

Authors