-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAppInfo.php
More file actions
39 lines (34 loc) · 1.05 KB
/
Copy pathAppInfo.php
File metadata and controls
39 lines (34 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
/**
* This class provides static methods that return pieces of data specific to
* your app
*/
class AppInfo {
/*****************************************************************************
*
* These functions provide the unique identifiers that your app users. These
* have been pre-populated for you, but you may need to change them at some
* point. They are currently being stored in 'Environment Variables'. To
* learn more about these, visit
* 'http://php.net/manual/en/function.getenv.php'
*
****************************************************************************/
/**
* @return the appID for this app
*/
public static function appID() {
return getenv('FACEBOOK_APP_ID');
}
/**
* @return the appSecret for this app
*/
public static function appSecret() {
return getenv('FACEBOOK_SECRET');
}
/**
* @return the home URL for this site
*/
public static function getHome () {
return ($_SERVER['HTTP_X_FORWARDED_PROTO'] ?: "http") . "://" . $_SERVER['HTTP_HOST'] . "/";
}
}