SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Zealot
    Join Date
    Aug 2010
    Posts
    143
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    API not loaded, please pass in a 'site'

    Hello,

    I have a puzzling message on my page at http://www.learnintouch.com/page/68

    It says the API is not loaded.

    The Firebug gives this: uncaught exception: API not loaded, please pass in a 'site'

    I wonder which API..

    Any clue ?

    Stephane

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,526
    Mentioned
    83 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by stephaneeybert View Post
    I wonder which API..

    Any clue ?
    It's the friendconnect script that's giving you that message.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Zealot
    Join Date
    Aug 2010
    Posts
    143
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Paul,

    Thanks for your investigation. I will check again that I have a website domain name in the Google Connect.

    I had looked for a website url in there but could not find it.

    But now I found it, hidden under the Parameters properties.

    It was at http://www.google.com/friendconnect/...e/settings?id=

    I changed the domain name to reflect the new one of learnintouch.com

    But after saving the page, I still get the same error message at my website...

    Strange.. Maybe it's a propagation timing..

    Stephane

  4. #4
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,526
    Mentioned
    83 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by stephaneeybert View Post
    But after saving the page, I still get the same error message at my website...

    Strange.. Maybe it's a propagation timing..
    The file itself that's being loaded is "friendconnect.js?key=notsupplied&v=0.8"
    There-in perhaps lies a clue.

    Another problem though is that your google analytics code contains some <br> HTML tags that must not be within a script block of code.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  5. #5
    SitePoint Zealot
    Join Date
    Aug 2010
    Posts
    143
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Good point Paul, I shall clean up the mess before disturbing you again, I just had this major refactoring and sure enough, the plant is still very green..
    Cheers,

  6. #6
    SitePoint Zealot
    Join Date
    Aug 2010
    Posts
    143
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Paul,

    I have now corrected the rendering of the markup code including the javascript code and the <br> tags are not there any more. Thanks for that.

    But I still get the same strange message and it seems like it is coming from Facebook.. if I'm not mistaken..

    Have a look at: http://www.learnintouch.com if you have time.

    Thanks again !

    Stephane

  7. #7
    SitePoint Zealot
    Join Date
    Aug 2010
    Posts
    143
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Something real strange is that the message:

    uncaught exception: API not loaded, please pass in a 'site'

    does not appear consistently on each page reload.

    Clicking on the Refresh button sometimes displays this message but not every time.

  8. #8
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,526
    Mentioned
    83 Post(s)
    Tagged
    3 Thread(s)
    Look at the source code for your web page and you see this:

    Code javascript:
    google.friendconnect.container.initOpenSocialApi({
      site: '',
      onload: function(securityToken) { googleSocialInit(); }
    });

    Look at the error message: Uncaught API not loaded, please pass in a 'site'

    Can you determine what needs to be done?
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  9. #9
    SitePoint Zealot
    Join Date
    Aug 2010
    Posts
    143
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Spot on Paul !

    site: '18312750800694811824' :-)

    I continue to the next error message now.. I should find my way.

    Thanks again !


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
  •