Script for maintaining session from browser for facebook automation
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
Account.php
Config.php
Parser.php
README.md
addAccount.php
checkAccounts.php
composer.json
composer.lock
config.json
example.php
index.php

README.md

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:

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?

<?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:

php index.php

Troubleshooting

I have problem with session, what do I do?

php checkAccounts.php

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

Authors