Y
Y
yischyk2019-08-10 11:15:06
PHP
yischyk, 2019-08-10 11:15:06

Why is cron not getting data without access_token vk?

Good morning.
I have a basic check if the user is logged in through VK

if (empty($token)) { 
echo 'Не залогинен';
} else {
echo 'Залогинен';
}

So, when I take and write the code
(получения, к примеру числа друзей пользователя с вк апи и заношу их в  бд)
and I write it exactly in that part of the code when the user is logged in, but the cron does not update the number of the user's friends.
In general, when I write code in the part of the code where the user is not logged in and I send not the number of friends, but any prime number. then it is updated. I was told to somehow pass the access_token so that the cron understands that the user is logged in, but how??
Many thanks to everyone who responds! :)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question