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 7643663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T09:30:11+00:00 2026-05-31T09:30:11+00:00

Facebook’s FB.api( ‘/me’ ) function recently started throwing the following error when run in

  • 0

Facebook’s FB.api( '/me' ) function recently started throwing the following error when run in mobile Safari:

TypeEror: ‘undefined’ is not an object

The code works fine in a desktop browser (tested in Chrome 19dev/OS X and Safari 5.1.3/OS X). I have tried two different Facebook app IDs on two different domains with the same results. I have tried two different Facebook user IDs with the same results. I have tried authenticating with FB.login() and FB.getLoginStatus() and it made no difference.

Demo: http://thinkingstiff.com/fb.htm

Script:

window.onload = function () {

    var script = document.createElement( 'script' );
    script.async = true;
    script.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
    document.getElementById( 'fb-root' ).appendChild( script );

    window.fbAsyncInit = function () {
        FB.init( {
            appId: '252706924818818',
            cookie: true,
            status: true,
            xfbml: true,
            oauth: true
        } );
    };

    function login1() {
        FB.login( function ( response ) {
            if ( response.authResponse ) {
                try {
                    FB.api( '/me', function ( response ) { // this line throws error
                        alert( 'success: ' + response.name );
                    } );
                } catch ( error ) {
                    alert( 'error: ' + error );
                };
            } else {
                alert( 'unauthorized' );
            };
        }, { scope: 'email' } );
    };

    function login2() {
        FB.getLoginStatus( function ( response ) {
            if ( response.authResponse ) {
                try {
                    FB.api( '/me', function ( response ) { // this line throws error
                        alert( 'success: ' + response.name );
                    } );
                } catch ( error ) {
                    alert( 'error: ' + error );
                };
            } else {
                alert( 'unauthorized' );
            };
        } );
    };

    function initialize() {
        document.getElementById( 'login1' ).addEventListener( 'click', login1, false );
        document.getElementById( 'login2' ).addEventListener( 'click', login2, false );
    };

    initialize();

};
​

HTML:

<button id="login1" class="fb-button">Login 1</button>
<button id="login2" class="fb-button">Login 2</button>
<div id="fb-root"></div>
  • 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-31T09:30:12+00:00Added an answer on May 31, 2026 at 9:30 am

    It looks like FB pushed some changes yesterday that might’ve caused this problem. Any browser with Flash deactivated seems to cause api calls to break. I am even having trouble logging into Spotify.com on iphone / ipad Safari.

    This looks like the bug reported at: http://developers.facebook.com/bugs/315958608459599?browse=search_4f60cb168df304e98947536

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

Sidebar

Related Questions

Facebook recently added photo-tagging capabilities to its Graph API: http://developers.facebook.com/blog/post/509/ I am using FbConnect
Facebook changed their Graph API recently to require an access token. Therefore I quickly
Facebook Android SDK when running example apps gives 11-14 23:17:58.484: ERROR/HttpOperation.run(1139): class java.net.UnknownHostException api.facebook.com
Facebook recently made access to the user's notifications using the Graph API possible. Using
Facebook API: How to let the php knows whether the user is a fan
Facebook graph API tells me I can get a profile picture of a user
Facebook offers a simple method to add a Facebook comment function on your personal
Facebook.prototype.post = function(options) { var data = { access_token: this.data.token, // message: options.message, link:
Facebook docs are quite sparse on this: http://developers.facebook.com/docs/reference/api/ , see Searching. It is possible
Facebook and Twitter membership script error: (does not record data to the database) Login=>FB/TW

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.