                     print("User unfriend successful")
                     dispatch_async(dispatch_get_main_queue(), { () -> Void in
                         sender.selected = false
+                        self.unfriendUserCustomizeButton()
                     })
                 } else if error != nil{
                     print("Error happened\n")

                    dispatch_async(dispatch_get_main_queue(), { () -> Void in
                        sender.selected = true
//                        self.connectButton.setTitle("Pending", forState: .Selected)
                    })
                } else if error != nil{
                    print("Error happened\n")


        }
    }
    
    @IBAction func connectLeftPressed(sender: UIButton) {
        if sender.selected {
            Tapglue.unfollowUser(cellUser, withCompletionBlock: { (success: Bool, error: NSError!) -> Void in
                if success {
                    print("User unfollow successful")
                    dispatch_async(dispatch_get_main_queue(), { () -> Void in
                        sender.selected = false
                        self.unfollowingUserCustomizeButton()
                    })
                } else if error != nil{
                    print("Error happened\n")
                    print(error)
                }
            })
        } else {
            Tapglue.followUser(cellUser, withCompletionBlock: { (success: Bool, error: NSError!) -> Void in
                if success {
                    print("User follow successful")
                    dispatch_async(dispatch_get_main_queue(), { () -> Void in
                        sender.selected = true
                        self.followingUserCustomizeButton()
                    })
                } else if error != nil{
                    print("Error happened\n")
                    print(error)
                }
            })
        }
    }
    
    func followingUserCustomizeButton(){
        self.connectLeftButton.setTitle("Following", forState: .Selected)
        self.connectLeftButton.backgroundColor = UIColor(red:0.016, green:0.859, blue:0.675, alpha:1)
    }
    func unfollowingUserCustomizeButton(){
        self.connectLeftButton.setTitle("Follow", forState: .Normal)
        self.connectLeftButton.backgroundColor = UIColor.lightGrayColor()
    }
    
    func friendUserCustomizeButton(){
        self.connectRightButton.setTitle("Friend", forState: .Selected)
        self.connectRightButton.backgroundColor = UIColor(red:0.016, green:0.859, blue:0.675, alpha:1)
    }
    func unfriendUserCustomizeButton(){
        self.connectRightButton.setTitle("Add Friend", forState: .Normal)
        self.connectRightButton.backgroundColor = UIColor.lightGrayColor()
    }

}
