How to save facebook objects between calls in php?

I draw the page correctly, display images, etc. But when the user changes the album selection, I want to use ajax to update the div.

My problem is that when I send a call to the server, it gets an exception, because facebook objects are dead / don't link, I don't know.

I tried to save them using session_start. I can pass strings like this, but if I pass objects like this, what still cannot be called:

$albumID = $_GET['album'];
    $facebook = $_SESSION['fb'];
    $albums = $_SESSION['albums'];
    $tester = $_SESSION['tester']; //works fine
    echo get_pictures_from_album($facebook, $albums, $albumID);

I would also repeat it if someone can pass me some good documentation. Facebook seems to have only examples for simple, trivial problems, but no complex applications.

+3
source share
1 answer

, , require , , session_start. PHP .

+3

Source: https://habr.com/ru/post/1789072/


All Articles