SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Addict
    Join Date
    Mar 2008
    Location
    Sterling, CO
    Posts
    275
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Expected identifier, string or number ERROR

    Hi,

    I keep getting a pop up error from IE 7 on this script below where I have the arrow. I've tried and I can't seem to fix it.


    Code:
    <script>
    window.fbAsyncInit = function(){
    FB.init({
    appId      : '<?php echo $config->appId; ?>',
    status     : true, 
    cookie     : true,
    xfbml      : true,
    oauth      : true,
    });      <-------------------HERE  "Expected identifier, string or number"       
    };
    
    function getAuthStatus(){
    FB.getLoginStatus(function(response){
    	if(response.status === 'connected'){
    		window.location = '?fb_auth=1';
    	}else if(response.status === 'not_authorized'){
    		//not authorised
    	}else{
    		//not connected
    	}
     });
    }
    
    (function(d){
    var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
    js = d.createElement('script'); js.id = id; js.async = true;
    js.src = "//connect.facebook.net/en_US/all.js";
    d.getElementsByTagName('head')[0].appendChild(js);
    }(document));
    </script>

  2. #2
    SitePoint Guru
    Join Date
    Sep 2006
    Posts
    731
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Freejoy View Post
    Code:
    <script>
    window.fbAsyncInit = function(){
    FB.init({
    appId      : '<?php echo $config->appId; ?>',
    status     : true, 
    cookie     : true,
    xfbml      : true,
    oauth      : true,
    });      <-------------------HERE  "Expected identifier, string or number"       
    };
    Lose the comma.
    Tab-indentation is a crime against humanity.

  3. #3
    SitePoint Addict
    Join Date
    Mar 2008
    Location
    Sterling, CO
    Posts
    275
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, That was it. Thanks


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •