Swift 3 - Value of type 'Any?' has no member 'valueForKey'
<p>Hi I have updated to swift 3 and am getting the error:  </p>

<blockquote>
  <p>Value of type 'Any?' has no member 'valueForKey'</p>
</blockquote>

<p>for the following lines of code:</p>

<pre><code>let userName : NSString? = result.valueForKey("name") as? NSString
let facebookID : NSString? = result.valueForKey("id") as? NSString
let firstName : NSString? = result.valueForKey("first_name") as? NSString
let lastName : NSString? = result.valueForKey("last_name") as? NSString
let email : NSString? = result.valueForKey("email") as? NSString
</code></pre>

<p>What is the explanation for theses errors and how would I go about fixing it?</p>

<p>Many thanks!</p>

<p>EDIT:</p>

<p>Full Code:</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>  if((FBSDKAccessToken.current()) != nil){
            FBSDKGraphRequest(graphPath: "me", parameters: ["fields": "id, name, first_name, last_name, email"]).start(completionHandler: { (connection, result, error) -&gt; Void in
                if (error == nil){
                    
                    
                    let userName : NSString? = result.valueForKey("name") as? NSString
                    let facebookID : NSString? = result.valueForKey("id") as? NSString
                    let firstName : NSString? = result.valueForKey("first_name") as? NSString
                    let lastName : NSString? = result.valueForKey("last_name") as? NSString
                    let email : NSString? = result.valueForKey("email") as? NSString
                    </code></pre>
</div>
</div>
</p>

<p>ANSWER:</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>  FBSDKGraphRequest(graphPath: "me", parameters: ["fields": "id, name, first_name, last_name, email"]).start(completionHandler: { (connection,  result, error) -&gt; Void in
                if (error == nil){
                    
                    let data:[String:AnyObject] = result as! [String : AnyObject]
                    
                    
                    let userName : NSString? = data["name"]! as? NSString
                    let facebookID : NSString? = data["id"]! as? NSString
                    let firstName : NSString? = data["first_name"]! as? NSString
                    let lastName : NSString? = data["last_name"]! as? NSString
                    let email : NSString? = data["email"]! as? NSString</code></pre>
</div>
</div>
</p>