Skip to content

Commit

Permalink
A total rewrite of the app.
Browse files Browse the repository at this point in the history
- Uses the official PHP and Javascript SDK
- Works as a standalone page, canvas page and mobile canvas page
  • Loading branch information
WizKid committed Jan 24, 2012
1 parent ec75edf commit 64c2626
Show file tree
Hide file tree
Showing 11 changed files with 262 additions and 293 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "sdk"]
path = sdk
url = git://github.com/WizKid/php-sdk.git
16 changes: 13 additions & 3 deletions AppInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,21 @@ public static function appID() {
public static function appSecret() {
return getenv('FACEBOOK_SECRET');
}

/**
* @return the home URL for this site
* @return the url
*/
public static function getHome () {
return ($_SERVER['HTTP_X_FORWARDED_PROTO'] ?: "http") . "://" . $_SERVER['HTTP_HOST'] . "/";
public static function getUrl($path = '/') {
if (isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on' || $_SERVER['HTTPS'] == 1)
|| isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'
) {
$protocol = 'https://';
}
else {
$protocol = 'http://';
}

return $protocol . $_SERVER['HTTP_HOST'] . $path;
}

}
117 changes: 0 additions & 117 deletions FBUtils.php

This file was deleted.

1 change: 1 addition & 0 deletions channel.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<script src="//connect.facebook.net/en_US/all.js"></script>
3 changes: 0 additions & 3 deletions close.php

This file was deleted.

Binary file modified images/sprites.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 64c2626

Please sign in to comment.