Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Is there any mistake in this code? I cant figure it out :/

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #163721
    AliRasheed
    Participant
    '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]

    #163773
    __
    Participant

    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?

    #163778
    chrisburton
    Participant

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

    #163880
    AliRasheed
    Participant

    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 …

    #163884
    __
    Participant

    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.

    #163888
    AliRasheed
    Participant

    how can I delete this post ??

    #163891
    AliRasheed
    Participant

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

    #163911
    chrisburton
    Participant

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

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘Back End’ is closed to new topics and replies.