 import FBSDKCoreKit
 import FBSDKLoginKit
 import FBSDKShareKit
+import SwiftyJSON
 
 class ViewController: UIViewController, FBSDKLoginButtonDelegate {
     @IBOutlet weak var txtLogin: UITextField!

        let session = NSURLSession.sharedSession()
        
        let task = session.dataTaskWithRequest(request) { data, response, error in
            
            if error != nil { // Handle error
                
                return
                
            }
            
            let newData = data?.subdataWithRange(NSMakeRange(5, data!.length - 5)) /* subset response data! */
            
            print(NSString(data: newData!, encoding: NSUTF8StringEncoding))
            
        }
        

    
    @IBAction func loginButtonAction(sender: UIButton) {
        
        if ((txtLogin.text!.isEmpty || txtPassword.text!.isEmpty)) {
            let alertController = UIAlertController(title: "On The Map", message:
                "Please fill both the username and password fields.", preferredStyle: UIAlertControllerStyle.Alert)
            alertController.addAction(UIAlertAction(title: "Dismiss", style: UIAlertActionStyle.Default,handler: nil))
            
            self.presentViewController(alertController, animated: true, completion: nil)
