Package com.gwtfb.client

Examples of com.gwtfb.client.JSOModel


  }
      
    public class getUserInfoCallback extends Callback<JavaScriptObject> {
        @Override
        public void onSuccess(JavaScriptObject response) {
          JSOModel jso = response.cast();
          fbNickName = jso.get("name");
          loginGAE();
        }
View Full Code Here


      }

    class loginStatusCallback extends Callback<JavaScriptObject> {
        @Override
        public void onSuccess(JavaScriptObject response) {
           JSOModel jsm = response.cast();
             String status = jsm.get("status");
             if (status.equals("connected")) {
                 JSOModel res = jsm.getObject("authResponse");
                 fbUid = res.get("userID");
                 String userImage = "http://graph.facebook.com/" + fbUid + "/picture";
                 graphics.setUserImage(userImage);
                 String url = "/" + fbUid + "?fields=name,username";
                 fbCore.api(url, new getUserInfoCallback());
                 fbCore.api("/me/friends", new friendListCallback());
View Full Code Here

   
    class friendListCallback extends Callback<JavaScriptObject> {
      @Override
        public void onSuccess(JavaScriptObject response){
        friendList = new MenuBar(true);
            JSOModel jso = response.cast();
            if (jso.hasKey("error")) {
                    Window.alert("Get Friend List Error");
                    return;
            }
            final JsArray array = jso.getArray("data");
            if (array != null) {
              for (int i = 0; i < array.length(); i++) {
                JSOModel j = array.get(i).cast();
                    final String name = j.get("name");
                    final String id = j.get("id");
                    friendsName.put(id, name);
                  
                    loginService.getIdInfo(fbUid, id, new AsyncCallback<OtherPlayerInfo>() {
                      @Override
                        public void onFailure(Throwable caught) {
View Full Code Here

TOP

Related Classes of com.gwtfb.client.JSOModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.