summaryrefslogtreecommitdiff
path: root/views/settings.php
diff options
context:
space:
mode:
authorAaron Parecki <aaron@parecki.com>2016-12-17 15:30:58 -0800
committerAaron Parecki <aaron@parecki.com>2016-12-17 15:30:58 -0800
commit7d19f61b101ca30debc675018f5509fb28e3de1a (patch)
tree16067e41f86d6aa99045d71795724a1e9d21dd7c /views/settings.php
parentefd82f8ff808f9e9b706e978c04eb77cdb463886 (diff)
remove facebook/instagram stuff
Diffstat (limited to 'views/settings.php')
-rw-r--r--views/settings.php79
1 files changed, 3 insertions, 76 deletions
diff --git a/views/settings.php b/views/settings.php
index 831528d..46df0bf 100644
--- a/views/settings.php
+++ b/views/settings.php
@@ -4,68 +4,16 @@
<h2>Signed In As</h2>
<code><?= session('me') ?></code>
- <!--
- <h3>Facebook</h3>
- <input type="button" id="facebook-button" value="Checking" class="btn">
- -->
+ <h3>Access Token</h3>
+ <input type="text" class="form-control" readonly="readonly" value="<?= $this->user->micropub_access_token ?>">
<h3>Twitter</h3>
+ <p>Connecting a Twitter account will automatically "favorite" tweets on Twitter when you favorite a Twitter URL in Quill.</p>
<input type="button" id="twitter-button" value="Checking" class="btn">
- <h3>Instagram</h3>
- <input type="button" id="instagram-button" value="Checking" class="btn">
-
</div>
<script>
-/*
-window.quillFbInit = function() {
- FB.getLoginStatus(function(response) {
- if (response.status === 'connected') {
- // the user is logged in and has authenticated your
- // app, and response.authResponse supplies
- // the user's ID, a valid access token, a signed
- // request, and the time the access token
- // and signed request each expire
- var uid = response.authResponse.userID;
- var accessToken = response.authResponse.accessToken;
-
- save_facebook_token(response.authResponse.accessToken);
-
- } else if (response.status === 'not_authorized') {
- // the user is logged in to Facebook,
- // but has not authenticated your app
- console.log("Logged in but not authorized");
-
- $("#facebook-button").val("Sign In").addClass("btn-warning");
-
- } else {
- // the user isn't logged in to Facebook.
- console.log("User isn't logged in");
-
- $("#facebook-button").val("Sign In").addClass("btn-warning");
- }
- });
-};
-window.quillHandleFbLogin = function(response) {
- save_facebook_token(response.authResponse.accessToken);
-};
-
-function save_facebook_token(token) {
- console.log("Authed with token: " + token);
- $.post('/auth/facebook', {
- fb_token: token
- }, function(data){
- $("#facebook-button").val("Connected").addClass("btn-success");
- });
-}
-*/
-
$(function(){
- /*
- $("#facebook-button").click(function(){
- FB.login(window.quillHandleFbLogin, {scope:'publish_actions,user_likes'});
- });
- */
$.getJSON("/auth/twitter", function(data){
// Check if we're already authorized with twitter
@@ -88,26 +36,5 @@ $(function(){
}
});
- $.getJSON("/auth/instagram", function(data){
- // Check if we're already authorized with Instagram
- if(data && data.result == 'ok') {
- $("#instagram-button").val("Connected").addClass("btn-success");
- } else if(data && data.url) {
- $("#instagram-button").val("Sign In").data("url", data.url).addClass("btn-warning");
- } else {
- $("#instagram-button").val("Error").addClass("btn-danger");
- }
- });
-
- $("#instagram-button").click(function(){
- if($(this).data('url')) {
- window.location = $(this).data('url');
- } else {
- $.getJSON("/auth/instagram", {login: 1}, function(data){
- window.location = data.url;
- });
- }
- });
-
});
</script>