James Jeffery
James Jeffery

Reputation: 43

Facebook offline access. Updating status via cron job?

My users have allowed offline access. I have the infinite access token, but can't figure out how to update the status from a cron job.

Any ideas?

Upvotes: 1

Views: 674

Answers (2)

Rinat
Rinat

Reputation: 56

Johannes, thanks for the tip about setSession. It worked, i do it like that now:

    $api = new FB();
    $api->setSession( unserialize($u['User']['stored_session'] ));

one question that remains, is for how long this session is valid.

Upvotes: 0

Johannes Gorset
Johannes Gorset

Reputation: 8785

You need to store their sessions somewhere, then use the setSession method of the Facebook SDK to populate it prior to making the request as you normally would.

Upvotes: 1

Related Questions