Grow your CSS skills. Land your dream job.

Is there any mistake in this code? I cant figure it out :/

  • # February 22, 2014 at 4:37 am
    '676470682413099', 
    'secret' => '*************************', 
    'cookie' => true
    
    ));
    
    $session = $facebook->getSession(); $me = null;
    
    /* if ($session) { try { $me = $facebook->api("/me"); }
    
          catch (FacebookApiException $e)
          {
             echo $e->getMessage();
          }      
    
    
    } */
    
    if ($me) { $logoutUrl = $facebook->getLogoutUrl(); echo "<a href='$logoutUrl'>Logout</a>"; } else { $loginUrl = $facebook->getLoginUrl(); echo "<a href='$loginUrl'>Login</a>"; }
    
    ?>
    

    [Moderator edit: do not post secret keys]

    # February 22, 2014 at 7:39 pm

    Your code is not readable. Sometimes, it’s a better idea to post your code somewhere like github to make sure there are no formatting issues.

    You need to provide more information about your problem if you want useful help. What do you expect to happen? what is actually happening? Are you getting any error messages? what have you done so far to try and troubleshoot?

    # February 22, 2014 at 11:13 pm

    You probably shouldn’t be posting your secret keys either.

    # February 23, 2014 at 1:49 pm

    every thing is working fine …
    the problem is that I cannot view the html
    although I have echo the tag but link is not visible …

    # February 23, 2014 at 2:05 pm

    every thing is working fine …

    the problem is that I cannot view the html

    These two statements seem to contradict each other.

    Also, what do you mean by “cannot view the html”? you don’t know how to view the HTML source? the HTML is not being output?

    As I explained above, tell us:

    • what you want to happen
    • what you are doing (show us the code)
    • what actually happens

    That’ll give us something to go on. As @chrisburton said, don’t show us sensitive information (like your facebook API secret) in your code: obfuscate it, for example, like:

    "secret" => "***********************"
    

    or

    "secret" => "/* my secret api key */"
    

    You should contact a moderator to remove it from your original post.

    # February 23, 2014 at 2:13 pm

    how can I delete this post ??

    # February 23, 2014 at 2:18 pm

    I’ll post this problem at github so that u may view the complete code .

    # February 23, 2014 at 3:48 pm

    At this point you should reset your keys but also hide them from now on.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".