I have looked at your PHP script in the question. As we have eliminated the redirect as the cause of the problem, let's look at the upload handler.
I have rewritten the script, and included a pile of debug messages, and I have also added a line which will delete an existing file if a user uploads a second one.
<?php
include_once( 'facebook.php' );
$appapikey = 'API KEY HERE';
$appsecret = 'SECRET KEY HERE';
$facebook = new Facebook( $appapikey , $appsecret );
$fb_user = $facebook->require_login();
if( empty( $_FILES['uploaded_file'] )
|| $_FILES['uploaded_file']['error']!=0
|| !preg_match( '/\.jpe?g$/i' , basename( $_FILES['uploaded_file']['name'] ) )
|| $_FILES['uploaded_file']['type']!='image/jpeg'
|| $_FILES['uploaded_file']['size']>350000 ){
/* DEBUG CODE - START */
echo '<h2>Error Detected</h2>';
echo '<ul>';
echo ( empty( $_FILES['uploaded_file'] )
? '<li>No Files - Empty</li>' : '' );
echo ( $_FILES['uploaded_file']['error']!=0
? '<li>Error '.implode(',',$_FILES['uploaded_file']['error']).'</li>' : '' );
echo ( !preg_match( '/\.jpe?g$/i' , basename( $_FILES['uploaded_file']['name'] ) )
? '<li>Filename does not look like a JPEG</li>' : '' );
echo ( $_FILES['uploaded_file']['type']!='image/jpeg'
? '<li>Filetype is '.$_FILES['uploaded_file']['type'].'</li>' : '' );
echo ( $_FILES['uploaded_file']['size']>350000
? '<li>Filesize is '.$_FILES['uploaded_file']['size'].'</li>' : '' );
echo '</ul>';
/* DEBUG CODE - END */
if( !headers_sent() )
header( 'Location: home.php?fatal' );
die();
}
$newname = dirname(__FILE__).'/upload/zbt_'.$fb_user.'.jpg';
if( file_exists( $newname ) ){
# User file already exists - Delete the Existing one.
unlink( $newname );
}
if( !move_uploaded_file( $_FILES['uploaded_file']['tmp_name'] , $newname ) ){
/* DEBUG CODE - START */
echo '<h2>Error Detected</h2>';
echo '<ul>';
echo '<li>Unable to Move File</li>';
echo '</ul>';
/* DEBUG CODE - END */
if( !headers_sent() )
header( 'Location: home.php?fatal' );
die();
}
header( 'Location: display.php' );
die();
If/when it works, remove anything between the /* DEBUG CODE - XXX */
sets.