+ Reply to Thread
Results 1 to 3 of 3

Thread: Facebook Connect API Problem !!!

  1. #1
    johnnygaddaar.cs58 is offline x10Hosting Member johnnygaddaar.cs58 is an unknown quantity at this point
    Join Date
    Jul 2010
    Posts
    21

    Exclamation Facebook Connect API Problem !!!

    Hello Guyz,

    First of all, I hope that I am posting this in the Right Section

    Actually, I am using Facebook Connect API in my Website so that people can also Login into my website through Facebook. I am using both Registration + Login system.

    Everything is working fine. When User Logs In to My website using Facebook, it snatches user's details like username and hi/her profile photo etc and make his/her account.

    But the Problem is that I am unable to Log them out.

    Right Now, I am using a hidden IFRAME in the Logout Screen page which Loads a page containing script to Log Out user from Facebook.

    But, It is not getting Logged Out.

    Due to this, When a User Logs In after filling the Login Info of FB once and then Logs Out of Website, and then again click Login using FB button, this Time it doesn't ask for the Login Info and Logs In as the Same User.

    It means anyone can Log In as that previous User account which hopefully no one wants.

    Please if you know much about Facebook API, then Please help me to get a code for Logging Out of Facebook.

    I am using this page as my IFRAME in LOGOUT SCREEN.

    http://www.clan-icsl.com/fblogout.html

    Code:
    <html> 
    <head> 
    <script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script> 
    <script type="text/javascript"> 
     
    function facebook_logout() {
     
             FB.Connect.logout(function() { FBCLogout() })
             function FBCLogout() {
                 document.write('logged out');
             }
         }
         
    </script> 
    </head> 
    <body onload="facebook_logout()"> 
    </body> 
    </html>

    So Please tell me What CODE should I use with Facebook API to Log Out a User. I can't Find any solution on Facebook Developers Help. So I posted here.

    Thank You

  2. #2
    espfutbol98's Avatar
    espfutbol98 is offline x10 Sophmore espfutbol98 is an unknown quantity at this point
    Join Date
    Apr 2009
    Location
    Zagreb... želim
    Posts
    200

    Re: Facebook Connect API Problem !!!

    First off, I'm still quite new at all of the Facebook APIs and I even tried making a site using this method, but I gave up on it because I had more important things to do. Also, I understand the origanal Facebook documentation sucks and can even be contradictory.

    I think it might be (1) missing the Facebook Javascript SDK or (2) your site might not be logging them out as well (depending on how you coded it). More in depth...

    On that one specific page, I did not see the Javascript SDK:
    http://github.com/facebook/connect-js/
    Code:
    <div id="fb-root"></div>
    <script src="http://connect.facebook.net/sr/all.js"></script>
    <script>
      FB.init({
        appId  : 'YOUR APP ID',
        status : true, // check login status
        cookie : true, // enable cookies to allow the server to access the session
        xfbml  : true  // parse XFBML
      });
    </script>
    Try using the Firebug plugin in Firefox, this should show any errors in the Javascript. (Sorry the Mozilla site is in Serbian from this url because my computer is too. Try changing the "sr" to "en" in the url)

    It could also be that your site requests them to login via Facebook, then Facebook sends you perameters that get turned into a Sesson. When they click the logout button, the Facebook session might be destroyed but not the one for only your site.

    Also check out this file:
    Code:
    http://www.megaupload.com/?d=UVH7M25X


    ---------- Post added at 05:50 AM ---------- Previous post was at 05:44 AM ----------

    Also, sometimes random things don't work in diffrent browsers (or at least on my computer). An example is when I go to a 3rd party "Like" site and I click the "Like" button, it doesn't do anything (when logged in) or I get a login window from Facebook that turns blank after logging in. This only happens in IE for me but not Firefox. This probably is not a factor but is still good to know.

  3. #3
    johnnygaddaar.cs58 is offline x10Hosting Member johnnygaddaar.cs58 is an unknown quantity at this point
    Join Date
    Jul 2010
    Posts
    21

    Re: Facebook Connect API Problem !!!

    Thanks for you Support !

    I had to remove that API because people were saying that they are getting logged in with other profiles. :P

    So I had to disable it.

    Thanks for your Support ! Now I will work on this !!!!!

+ Reply to Thread

Similar Threads

  1. Problem to connect Ftp
    By megaporns in forum Free Hosting
    Replies: 1
    Last Post: 10-18-2009, 05:48 AM
  2. FTP connect problem
    By kalayy in forum Free Hosting
    Replies: 2
    Last Post: 03-23-2009, 11:49 AM
  3. Forums that work with Facebook Connect
    By Jeremia0 in forum Scripts & 3rd Party Apps
    Replies: 0
    Last Post: 01-23-2009, 02:34 PM
  4. SQL Connect problem Again...
    By empang in forum Free Hosting
    Replies: 4
    Last Post: 12-27-2007, 11:05 AM
  5. Ftp problem, can't connect
    By Rhineus in forum Free Hosting
    Replies: 5
    Last Post: 09-20-2007, 07:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers