Not sure if your allowed to help me since this is a modification, but perhaps you could point me in the right direction.
I am making a facebook app. The page that the app uses is a custom vbulletin template found at blacklabelled.com/facebook/splash/index.php. The index file requires facebook_splash.php which is in the same directory. I have provided the code below. It works fine when accessing it directly, however when accessing it through facebook it returns a security token missing error. Any ideas?
PHP Code:
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT', 'facebook_splash');
define('CSRF_PROTECTION', true);
// change this depending on your filename
// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array();
// get special data templates from the datastore
$specialtemplates = array();
// pre-cache templates used by all actions
$globaltemplates = array('facebook_splash',
);
// pre-cache templates used by specific actions
$actiontemplates = array();
// ######################### REQUIRE BACK-END ############################
// if your page is outside of your normal vb forums directory, you should change directories by uncommenting the next line
chdir ('/home/blackl/public_html');
require_once('./global.php');
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
$navbits = construct_navbits(array('' => 'Facebook App - Splash'));
$navbar = render_navbar_template($navbits);
// ###### YOUR CUSTOM CODE GOES HERE #####
$pagetitle = 'BlackLabelled on Facebook';
// ###### NOW YOUR TEMPLATE IS BEING RENDERED ######
$templater = vB_Template::create('facebook_splash');
$templater->register_page_templates();
$templater->register('navbar', $navbar);
$templater->register('pagetitle', $pagetitle);
print_output($templater->render());
?>
--------------- Added [DATE]1304803941[/DATE] at [TIME]1304803941[/TIME] ---------------
define('CSRF_PROTECTION', false);
disabled security token checking. good provided no form submissions take place