Add Twitter integration | test post

This commit is contained in:
Pòsweg 2020-08-16 07:54:12 +02:00
parent 3826f92b8a
commit 08ca95881d
1 changed files with 16 additions and 1 deletions

View File

@ -1,7 +1,15 @@
<?php
session_start();
if(!isset($_SESSION["uid"])){
header("Location: /login");
die();
}
include("include/header.php");
include("include/settings.php");
session_start();
$db = new SQLite3('ask.db');
?>
<!DOCTYPE html>
@ -22,5 +30,12 @@ session_start();
Twitter.
</p>
<?php
if(!$db->querySingle("SELECT tw_oauth_verify FROM users where id = " . $_SESSION["uid"] . ";")){
echo "<p><a href='/action/tw-login.php'>Login with Twitter</a></p>";
}
else echo "<p><a href='/action/tw-post-sample'>Post test tweet</a>";
?>
</body>
</html>