Add Twitter integration | test post
This commit is contained in:
parent
3826f92b8a
commit
08ca95881d
17
config.php
17
config.php
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue