From 2cd148c792a47fea18d760b723d23569ae52d390 Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Wed, 24 Dec 2014 16:44:44 -0800 Subject: Support for "likes" and adding "settings" page * Supports a bookmarklet to create "like" posts. * Beginning a "settings" page to connect silo profiles for POSSEing likes to twitter, facebook and instagram --- views/layout.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'views/layout.php') diff --git a/views/layout.php b/views/layout.php index 531dec9..0c78aa7 100644 --- a/views/layout.php +++ b/views/layout.php @@ -31,6 +31,12 @@ + + + + + + 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; + console.log(accessToken); + + FB.api("/facebook_id ?>/likes", "post", function(response){ + console.log(response); + show_star(); + }); + + } 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"); + } else { + // the user isn't logged in to Facebook. + console.log("User isn't logged in"); + } + }); + }; + + + */ ?> + + + + \ No newline at end of file diff --git a/views/layout.php b/views/layout.php index 0c78aa7..8d7607d 100644 --- a/views/layout.php +++ b/views/layout.php @@ -33,7 +33,7 @@ @@ -64,13 +64,13 @@ if(property_exists($this, 'include_facebook')) {
  • New Post
  • Bookmark
  • +
  • Favorite
  • Docs