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 | |
// [Accept only server-generated SIDs] | |
// One way to improve security is not to accept session identifiers that were not generated by the | |
// server. However, as noted above, this does not prevent all session fixation attacks. | |
if (!isset($_SESSION['SERVER_GENERATED_SID'])) { | |
session_destroy(); // destroy all data in session | |
} | |
session_regenerate_id(); // generate a new session identifier | |
$_SESSION['SERVER_GENERATED_SID'] = true; |
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 | |
// include required files form Facebook SDK | |
// added in v4.0.5 | |
require_once( 'Facebook/FacebookHttpable.php' ); | |
require_once( 'Facebook/FacebookCurl.php' ); | |
require_once( 'Facebook/FacebookCurlHttpClient.php' ); | |
// added in v4.0.0 |
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 | |
// requires Facebook PHP SDK 4.0.x or later | |
// user must be logged-in prior to API call | |
// publish story, requires 'places' attribute | |
// use a page_id with no address to tag hidden location | |
// $tags is a comma-separated string of IDs | |
$story = (new FacebookRequest( $session, 'POST', '/me/feed', array( |
NewerOlder