Help how works fb log in on my site,

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Help how works fb log in on my site,

    Any one help me i have a error of my fb log in it seems blank pages,

    C0de:
    <?php
    $stoken = Util::getMD5GUID();
    $gWeb->store("fb_state",$stoken);
    $fbAppId = Config::getInstance()->get_value("470580912986218");
    $host = "http://".$_SERVER["HTTP_HOST"];
    $fbCallback = $host."/callback/fb2.php" ;

    $fbDialogUrl = "https://www.facebook.com/dialog/oauth?client_id=".$fbAppId ;
    $fbDialogUrl .= "&redirect_uri=".urlencode($fbCallback)."&scope=em ail&state=".$stoken ;
    ?>

    <a href="<?php echo $fbDialogUrl; ?>"> Login with Facebook</a>

    Anyone have complete code my script is lava.,

    #2
    Your code is full of unfinished and unclosed stuff

    PHP Code:
    <?php
    $stoken 
    Util::getMD5GUID();
    $gWeb->store("fb_state",$stoken);
    $fbAppId Config::getInstance()->get_value("470580912986218");
    $host "http://".$_SERVER["HTTP_HOST"];//--->fail to close properly
    $fbCallback $host."/callback/fb2.php" ;//---->fail to open properly
    $fbDialogUrl "https://www.facebook.com/dialog/oauth?client_id=".$fbAppId ;//---> total fckup
    $fbDialogUrl .= "&redirect_uri=".urlencode($fbCallback)."&scope=em ail&state=".$stoken ;//--->$token begin with ( ". ) but not ending with ( ." )
     
    ?>
    PHP Code:
    <?php
    $stoken 
    Util::getMD5GUID();
    $gWeb->store("fb_state",$stoken);
    $fbAppId Config::getInstance()->get_value("470580912986218");
    $host "http://".$_SERVER["HTTP_HOST"]."";
    $fbCallback "".$host."/callback/fb2.php" ;
    $fbDialogUrl "https://www.facebook.com/dialog/oauth?client_id=".$fbAppId."";
    $fbDialogUrl .= "&redirect_uri=".urlencode($fbCallback)."&scope=em ail&state=".$stoken."";
     
    ?>

    Comment


      #3
      thank you i will try this one.

      Comment


        #4
        Facebook has a PHP sdk that helps you with heavy lifting. Use it.

        Comment

        Working...
        X