Note that there are some explanatory texts on larger screens.

plurals
  1. POFacebook: FB.apiClient TypeError: $wnd.FB.Facebook is undefined" why this error occures?
    primarykey
    data
    text
    <p>We are facing one problem with facebook. we integrated FB in our web application, when user login through fconnect in our web application then he registered with our system(1st time only) just providing his email id.For normal user few user i/p for registration in our system </p> <p>Our web-application developed in java [GWT2.0]. </p> <p>Problem is when FACEBOOK or normaluser login through FB in our web-application.( 1 at a time)</p> <p>when user refreshes page then FB pop window Occues with message </p> <p><b> "Debug: Exception while loading FB.apiClient TypeError: $wnd.FB.Facebook is undefined" </b></p> <p>or sometimes <b>$wnd.FB.Facebook.apiClient is null </b> occures</p> <p>we get above error[pop-up] message 3 times. </p> <p>we used following script in html page &lt; script type="text/javascript" language="javascript" src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php"></p> <p>In only 1 page of our web-application i.e UserHome page where we display users info . on that page only above error message occurs</p> <p>We used following GWT Code [from Gwittit] In controller class[Singleton class ]</p> <blockquote> <p>/** * Function get called when all the data on first page get loaded. * * */ public void notifyFinishedLoadinPage() { FacebookConnect.waitUntilStatusReady(new RenderAppWhenReadyCallback());</p> <pre><code>} </code></pre> <p>private MyLoginCallback loginCallback = new MyLoginCallback();</p> <pre><code>class MyLoginCallback implements LoginCallback { public void onLogin() { isFacebookSign = true; fbLoggedInUserId = ApiFactory.getInstance().getLoggedInUser(); for (FacebookObserver Observer : facebookObservers) { Observer.notifyFacebookLogin(true); } } } public void publishStream(final FacebookObserver fbObserver) { FacebookConnect.init(FacebookConstants.FACEBOOK_API_KEY, </code></pre> <p>"xd_receiver.htm", loginCallback);</p> <pre><code> FacebookConnect.requireSession(new </code></pre> <p>AsyncCallback() {</p> <pre><code> public void onFailure(Throwable caught) { Window.alert("Require session failed: " + caught); GWT.log("Require session failed: " + caught, null); } public void onSuccess(Boolean isLoggedIn) { if (isLoggedIn) { for (FacebookObserver Observer : </code></pre> <p>facebookObservers) { Observer.notifyPublishStream(); } } } });</p> <pre><code>} public void facebookConnection() { FacebookConnect.init(FacebookConstants.FACEBOOK_API_KEY, </code></pre> <p>"xd_receiver.htm", loginCallback); //SERVER FacebookConnect.requireSession(new AsyncCallback() {</p> <pre><code> public void onFailure(Throwable caught) { GWT.log("Require session failed: " + caught, null); } public void onSuccess(Boolean isLoggedIn) { if (loginCallback != null &amp;&amp; isLoggedIn) { loginCallback.onLogin(); } else { //User not logged in } } }); } /** * Fired when we know users status */ private class RenderAppWhenReadyCallback implements </code></pre> <p>AsyncCallback {</p> <pre><code> public RenderAppWhenReadyCallback() { FacebookConnect.init(FacebookConstants.FACEBOOK_API_KEY, </code></pre> <p>"xd_receiver.htm", loginCallback); //SERVER }</p> <pre><code> public void onFailure(Throwable caught) { Window.alert("Unable to login through Facebook: " + caught); } public void onSuccess(ConnectState result) { if (result == ConnectState.connected) { isFacebookSign = true; for (FacebookObserver Observer : facebookObservers) { Observer.notifyFacebookLogin(true); } //History.newItem(HistoryConstants.USERHOME_PAGE_HISTORY_TOKEN); } else { //rightSideFlexTable.clearCell(0, 0); //rightSideFlexTable.setWidget(0, 0, </code></pre> <p>facebookPanel); isFacebookSign = false;</p> <pre><code> } } }; </code></pre> </blockquote> <p>Now we unable to found solution to this problem. </p> <p>Can any one help Us to solve this problem ASAP</p> <p>Hope-for the Best Co-operation</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload