Should I store my Facebook access tokens?

There are a number of explanations here: https://developers.facebook.com/docs/facebook-login/access-tokens The time it takes for your server to talk with facebook does contribute to a good amount of slowdown. So it depends on how intensely you plan to use the api. In that case, storing the key and other fb related user data can cut that cross-talk … Read more

Where is the wordpress session stored?

How WordPress stores cookies (client-side, as @birgire stated): https://codex.wordpress.org/WordPress_Cookies I doubt this will ever work from a separate subdomain as the cookie domain is usually fully-qualified to the WordPress siteurl (someone feel free to correct me.) If you were doing it with another app on the same domain, you’d need to make use of the … Read more

$_SESSION variables lost during OAuth callback

With my version of wordpress there is NO session. So when I call $_SESSION[‘callback_state’]=stuff it’ll gladly save it to a temporary stack local variable instead of with the actual session. So before you redirect do: if (!session_id()) {session_start();} //then the normal redirect header(“location: $newUrl”); exit(0);

how to show posts of category random by session

You don’t need complicated filters to modify the SQL query, just use the order parameter of WP_Query ( avoid query_posts, your code above will trigger multiple unused queries, making the page very slow ) $q = new WP_Query( [ ‘order’ => ‘rand’ ] ); You can pass an integer seed too: $q = new WP_Query( … Read more

Session is not starting

No, there’s no disadvantage to starting a session directly in your theme’s functions.php. However, it’s strange that starting your session on init is not working for you. Could it perhaps be that output is being generated (perhaps a space or a line break) before init? Could you turn WP_DEBUG on and see if any notices … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)