Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6208467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:48:52+00:00 2026-05-24T05:48:52+00:00

I have this code if user is not logged in through facebook on check

  • 0

I have this code if user is not logged in through facebook on check show facebook for user to log in through facebook.

if($req_user['oauth_provider'] != "facebook")
{
   <input type="checkbox" name="fb_post" id="fb_post" value="1" onclick="facebookPermissionsGrant(); return false;">}
?>

If user is logged in through facebook show checkbox checked:

if($req_user['oauth_provider'] == "facebook" && $CONFIG['fb_status'] == 1) {
 <input type="checkbox" name="fb_post" id="fb_post" value="1" checked>
}

Problem i am having is if user is not logged in through facebook and checks the checbox and enter username and password on facebook. He has to refresh the page again to see that box checked.
Is there a way in ajax or in jquery so that i dont have to refresh the page and if user logged in it will show box checked?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T05:48:53+00:00Added an answer on May 24, 2026 at 5:48 am

    Yes, there is. Facebook’s Javascript API has got FB.Event.Subscribe, which notifies your javascript when the user’s login status changes.

    Example:

    window.fbAsyncInit = function() {
        FB.init({
            appId  : 'YOURAPPID',
            status : true, // check login status
            cookie : true, // enable cookies to allow the server to access the session
            xfbml  : true,  // parse XFBML
            channelUrl  : 'http://www.yourdomain.com/channel.html', // Custom Channel URL
            oauth : true //enables OAuth 2.0
        });
    
        // retrieve the login status.
        FB.getLoginStatus(function(response) {
            if (response.authResponse) update_user_is_connected();
            else update_user_is_not_connected();
        });
    
        // This will be triggered as soon as the user logs into Facebook (through your site)
        FB.Event.subscribe('auth.login', function(response) {
            update_user_is_connected();
        });
    };
    

    You can read more about FB.Event.subscribe here: http://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this block of code: users = Array.new users << User.find(:all, :conditions =>
I have a greasemonkey user script with this single line of code... window.close(); but
In our application, I have seen code written like this: User.java (User entity) public
Hej, assuming I have a code that looks like this: List<User> userList = GetUserByName
I have some troubles when using javascript code for Facebook invite friends. Details: User
So I have some code where I grab the logged in users Facebook ID
I have this code: $('.user_info').click(function(){ var pos = $(this).offset(); rel_value = $(this).attr('rel'); $('#' +
I have this code: btn_jouer.onRelease = function () { verif = txt_email_user.text; if (txt_email_user.text
I have this code in jQuery, that I want to reimplement with the prototype
I have this code: chars = #some list try: indx = chars.index(chars) except ValueError:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.