From 8be498a324954f9d5792ca921b7364f53ff4085f Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Fri, 26 Dec 2014 14:57:31 -0800 Subject: new "favorite" form with bookmarklet * disable facebook liking for now since it was getting complicated * new page for creating a favorite, can pass in a URL parameter too * bookmarklet code added to the "favorite" page --- views/favorite-popup.php | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 views/favorite-popup.php (limited to 'views/favorite-popup.php') diff --git a/views/favorite-popup.php b/views/favorite-popup.php new file mode 100644 index 0000000..fecc780 --- /dev/null +++ b/views/favorite-popup.php @@ -0,0 +1,50 @@ + + + + Favoriting + + + + + + + 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 -- cgit v1.2.3