Facebook App Postback Script

Discussion in 'PHP' started by Konspiracy, Mar 27, 2010.

  1. #1
    Hello everyone, I am developing an app for facebook, and I am using SuperRewards for my monetary platform. Well, I have everything set up, but the postback script isn't working, so whenever I test the postback, it doesn't give my admin account the points. Can anyone please help? Below is the script:
    
    <?
    include("includes/clsGeneral.php");
    
    //check md5
    $SECRET = '***************************';
    $sig = md5($_REQUEST['id'] . ':' . $_REQUEST['new'] . ':' . $_REQUEST['uid'] . ':' .
    $SECRET);
    
    if($_REQUEST['sig'] == $sig) {
    	$userdata = GetUserInfo($_REQUEST['uid']);
    	$conn = ConnectDB();
    	$res = mysql_query('UPDATE users SET king_author_points + '.$_REQUEST['new'].' WHERE id = '.$_REQUEST['uid'].''. $connection);
    	if($res){
    		print "1";
    	    }else{
    		print "0";
    	}
        }else{
    		print "0";
    	}
    
    
    
    
    PHP:

     
    Konspiracy, Mar 27, 2010 IP
  2. ThomasTwen

    ThomasTwen Peon

    Messages:
    113
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    It seems right to me, you might want to log the output when the postback script is called!
     
    ThomasTwen, Mar 27, 2010 IP