HOW DO I FIND MY USER ID CODE FROM THIS?Code:Qt.include("databaseFile.js") var accessToken = ""; var notificationsLoaded = false; var lastReadNotificationID = ""; function setAccessToken(token) { accessToken = token; mainAccessToken = token; isLoggedIn = true; isGetAccessTokenCalled =false; } function getAccessToken(code) { isGetAccessTokenCalled = true; var url = "https://graph.facebook.com/oauth/access_token?client_id=<------ID----->&redirect_uri=https://www.facebook.com/connect/login_success.html&client_secret=<-----SECRET-------->&code=" +code; doWebRequest("GET", url, "", parseAccessToken); } function setEmptyKey(accessToken) { setKeyValue("accesstoken", accessToken); } function parseAccessToken(response) { accessToken = "access_token=" + parseParameter(response, "access_token"); window.mainAccessToken = accessToken; setKeyValue("accesstoken", accessToken); isLoggedIn = true; isGetAccessTokenCalled = false; loadHomeFeed(); loadFriends(); } function loadHomeFeed() { var url = "https://graph.facebook.com/me/home?" + mainAccessToken; doWebRequest("GET", url, "", parseHomeFeed); } // adding friends profile function loadFriendsProfile(id) { myFriendsProfileModel.clear(); var url = "https://graph.facebook.com/" + id + "?fields=name,id,location,picture&" + mainAccessToken; doWebRequest("GET", url, "", parseProfile); } function parseProfile(response) { var user = eval("[" + response + "]")[0]; if(user.location!==undefined) { if(user.location.id !== "" || user.location.name !== null ) { myFriendsProfile.userId = user.id; myFriendsProfile.userName= user.name; myFriendsProfile.userImage = user.picture; myFriendsProfile.userLocationId = (user.location!==undefined ? user.location.id : ""); myFriendMapModel.locationName= myFriendsProfile.userLocationName = (user.location!==undefined ? user.location.name : ""); myFriendMapModel.refresh(); //load user location on map } else{ myFriendsProfile.userId = user.id; myFriendsProfile.userName= user.name; myFriendsProfile.userImage = user.picture; myFriendsProfile.userLocationId ="";// (user.location!==undefined ? user.location.id : ""); myFriendsProfile.userLocationName ="";// (user.location!==undefined ? user.location.name : ""); } } else{ myFriendsProfile.userId = user.id; myFriendsProfile.userName= user.name; myFriendsProfile.userImage = user.picture; myFriendsProfile.userLocationId ="";// (user.location!==undefined ? user.location.id : ""); myFriendsProfile.userLocationName = "";//(user.location!==undefined ? user.location.name : ""); } closeWaitingIndicator(); //indi } function getFriendsLocationInfo() { if(myFriendMapModel.count!==0) { feedModelUserLocation.userLatitude = myFriendsProfile.userCordinateLat =myFriendMapModel.get(0).lat; feedModelUserLocation.userLongitude = myFriendsProfile.userCordinateLon =myFriendMapModel.get(0).lng; } } //end of friends profile function loadUserWall(id) { meWallModel.clear(); var url = "https://graph.facebook.com/" + id + "/feed?" + mainAccessToken; doWebRequest("GET", url, "", parseUserWallFeed); } function loadAlbums(id) { meAlbumsModel.clear(); var url = "https://graph.facebook.com/" + id + "/albums?" + mainAccessToken; doWebRequest("GET", url, "", parseAlbums); } function parseAlbums(response) { var data = eval("[" + response + "]")[0].data; var count = 0; for(var i in data) { var album = data[i]; var updated = parseDate(album.updated_time); var albumUpdated = prettyDate(updated); meAlbumsModel.append({ "cover": "https://graph.facebook.com/" + album.id + "/picture?type=thumbnail&" + ...... ECC.... CODE BY KASVOPUS
I HAVE TO INTEGRATE THIS?
Code:FB.getLoginStatus(function(response) { if (response.status === 'connected') { // the user is logged in and connected to your // app, and response.authResponse supplies // the user’s ID, a valid access token, a signed // request, and the time the access token // and signed request each expire var uid = response.authResponse.userID; var accessToken = response.authResponse.accessToken; } else if (response.status === 'not_authorized') { // the user is logged in to Facebook, //but not connected to the app } else { // the user isn't even logged in to Facebook. } });




