- public FacebookWeb(final String appKey)
- {
- this.appKey=appKey;
- ScriptInjector.fromUrl("http://connect.facebook.net/en_US/sdk.js").setCallback(new Callback<Void, Exception>(){
- public void onFailure(Exception e)
- {
- Window.alert(e.getMessage());
- }
- public void onSuccess(Void result)
- {
- initialize(appKey);
- setInitialized();
- }
- });
- }
- protected void setInitialized() {
- initialized=true;
- }
- public boolean isInitialized()
- {
- return initialized;
- }
- private native void initialize(String appKey)
- /*-{
- $wnd.fbAsyncInit = function() {
- FB.init({
- appId : appKey,
- xfbml : true,
- version : 'v2.0'
- });
- };
- }-*/;
SHARE
TWEET
Untitled
a guest
Sep 16th, 2014
199
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.
