This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Hello {{ name }}!</h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^ index.php [L] | |
</IfModule> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once __DIR__.'/silex.phar'; | |
$app = new Silex\Application(); | |
$app->post('/', function() use($app) { | |
return 'Hello world!'; | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function swap_access_token_for_page($access_token, $page_id) | |
{ | |
$accounts = file_get_contents('https://graph.facebook.com/me/accounts?access_token='.$access_token); | |
$accounts = json_decode($accounts, true); | |
if (isset($accounts['data'])) { | |
foreach ($accounts['data'] as $account) { | |
if ($page_id == $account['id']) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ edit index.php (paste the code from above) | |
$ git clone git://github.com/facebook/php-sdk.git | |
$ git clone git://github.com/caefer/FB.Permission.git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$APP_ID = 'YOUR_APP_ID'; | |
$APP_SECRET = 'YOUR_APP_SECRET'; | |
?> | |
<html lang="en"> | |
<head> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> | |
</head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html lang="en"> | |
<head> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> | |
</head> | |
<body> | |
<color value="red"><shape value="round"><size value="large"> | |
<div class="thing"> | |
<h3>Sun</h3> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function filter(attribute, value) | |
{ | |
$('.thing .'+attribute+'.'+value).hide(); | |
} | |
function unfilter(attribute, value) | |
{ | |
$('.thing .'+attribute+'.'+value).show(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="thing"> | |
<div class="color red"> | |
<div class="size large"> | |
<div class="shape round"> | |
<strong>Sun</strong> color: red, size: large, shape: round | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="thing"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="thing"> | |
<strong>Sun</strong> color: red, size: large, shape: round | |
</div> | |
<div class="thing"> | |
<strong>Moon</strong> color: lightgrey, size: medium, shape: round | |
</div> | |
... |