From fd51f74eb554e685ae829eba3a21b054486233d0 Mon Sep 17 00:00:00 2001 From: pictuga Date: Thu, 19 Mar 2020 10:03:59 +0100 Subject: [PATCH] feeds: drop facebook-related code No longer maintained and of little use anyway --- morss/feedify.ini | 29 ----------------------------- www/facebook.php | 27 --------------------------- 2 files changed, 56 deletions(-) delete mode 100644 www/facebook.php diff --git a/morss/feedify.ini b/morss/feedify.ini index 75f0299..48240c4 100644 --- a/morss/feedify.ini +++ b/morss/feedify.ini @@ -144,32 +144,3 @@ items = //div[class=results_links][not(contains(@class,'sponsored'))] item_title = .//a[class=result__a] item_link = .//a[class=result__a]/@href item_desc = .//a[class=result__snippet] - -[facebook home] -mode = json -path = - https://graph.facebook.com/*/home* - https://graph.facebook.com/*/feed* - -title = "Facebook" -items = data - -item_title = from.name {" > " to.data.name<", ">} -item_link = actions.link[0] -item_content = message story{"

"}{"
" name "
" description "
"}{"

– @ " place.name} -item_time = created_time -item_id = id - -[facebook message/post] -mode = json -path = - https://graph.facebook.com/* - https://graph.facebook.com/* - -title = "Facebook" -items = comments.data - -item_title = from.name -item_content = message -item_time = created_time -item_id = id diff --git a/www/facebook.php b/www/facebook.php deleted file mode 100644 index f5e4de0..0000000 --- a/www/facebook.php +++ /dev/null @@ -1,27 +0,0 @@ -"); -define('FBSECRET', ""); -define('FBAPPTOKEN', FBAPPID . '|' . FBSECRET); - -if (isset($_GET['code'])) -{ - # get real token from code - $code = $_GET['code']; - $eurl = sprintf("https://graph.facebook.com/oauth/access_token?client_id=%s&redirect_uri=%s&client_secret=%s&code=%s", - FBAPPID, $_SERVER['SCRIPT_URI'], FBSECRET, $code); - parse_str(file_get_contents($eurl), $values); - $token = $values['access_token']; - - # get long-lived access token - $eurl = sprintf("https://graph.facebook.com/oauth/access_token?grant_type=fb_exchange_token&client_id=%s&client_secret=%s&fb_exchange_token=%s", - FBAPPID, FBSECRET, $token); - parse_str(file_get_contents($eurl), $values); - $ltoken = $values['access_token']; - - setcookie('token', $ltoken, 0, '/'); - - # headers - header('status: 303 See Other'); - header('location: http://' . $_SERVER['SERVER_NAME'] . '/'); -}