feeds: drop facebook-related code

No longer maintained and of little use anyway
master
pictuga 2020-03-19 10:03:59 +01:00
parent d3fe51cea5
commit fd51f74eb5
2 changed files with 0 additions and 56 deletions

View File

@ -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{"<br/><br/><a href='" link "'><img src='" picture "' /></a>"}{"<blockquote><a href='" link "'>" name "</a><br/>" description "</blockquote>"}{"<br/><br/> @ " 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

View File

@ -1,27 +0,0 @@
<?php
define('FBAPPID', "<insert yours>");
define('FBSECRET', "<insert yours>");
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'] . '/');
}