44 lines
2.0 KiB
PHP
44 lines
2.0 KiB
PHP
<?php
|
|
/**
|
|
* Site config template — tracked in git, safe to commit (no real secret
|
|
* here). Copy this file to config.php (gitignored) and fill in your own
|
|
* FB_PAGE_ACCESS_TOKEN there.
|
|
*/
|
|
|
|
// Base URL the site is currently reachable at. Used for social sharing
|
|
// meta tags (og:url, og:image, twitter:image), which need absolute URLs.
|
|
// Currently pointed at the temporary daviddyer.me subdomain — update
|
|
// this to the permanent domain once the site moves there.
|
|
define('SITE_URL', 'https://theoldfitz.daviddyer.me');
|
|
|
|
// The Old Fitz's Facebook Page ID (from the facebook.com/profile.php?id=... links already on the site).
|
|
define('FB_PAGE_ID', '100086635646712');
|
|
|
|
// Paste a Page Access Token here to make the homepage stats live.
|
|
// Until this is filled in, the site quietly uses the fallback numbers below.
|
|
//
|
|
// To generate one:
|
|
// 1. Go to https://developers.facebook.com/apps and create an app
|
|
// (type: "Business"), logged in as an admin of The Old Fitz Page.
|
|
// 2. In Graph API Explorer (developers.facebook.com/tools/explorer),
|
|
// pick that app, select "Page Access Token" for The Old Fitz,
|
|
// requesting the pages_read_engagement permission.
|
|
// 3. Use the "Access Token Debugger" (developers.facebook.com/tools/debug/accesstoken)
|
|
// to extend it to a long-lived token (~60 days). Long-lived Page
|
|
// tokens generally don't expire on their own with regular use, but
|
|
// Meta can still invalidate one (password change, permission
|
|
// changes, app review) — if that happens, this just falls back to
|
|
// the numbers below instead of breaking the page.
|
|
define('FB_PAGE_ACCESS_TOKEN', '');
|
|
|
|
// How often to re-fetch from Facebook, in seconds. 6 hours is plenty for
|
|
// numbers that move a few times a month.
|
|
define('FB_STATS_CACHE_TTL', 6 * 60 * 60);
|
|
|
|
// Fallback numbers — used whenever there's no token yet, or the Facebook
|
|
// API call fails for any reason. Update these by hand if you're not
|
|
// using the live token.
|
|
define('FB_FALLBACK_RECOMMEND_PCT', 92);
|
|
define('FB_FALLBACK_REVIEW_COUNT', 11);
|
|
define('FB_FALLBACK_FOLLOWERS', 2600);
|