completion handler's error in swift 3 and Xcode 8 : <p>I have working project in Xcode 7.3 with swift 2.2 version. Now I have updated Xcode 8 and migrated to swift 3. Now my project contains errors specially for blocks like success block of afnetworking.</p>

<p><a href="https://i.stack.imgur.com/NYIe1.png"><img src="https://i.stack.imgur.com/NYIe1.png" alt="Snapshot for error in afnetworking post method"></a></p>

<p>Which gives error as </p>

<pre><code>Cannot convert value of type '() -&gt; ()' to expected argument type '((URLSessionDataTask, Any?) -&gt; Void)?'
</code></pre>

<p>I don't understand how to solve this to work as per swift 3.</p>

<p>And there is also same like error in Facebook login.</p>

<p><a href="https://i.stack.imgur.com/uJ9uG.png"><img src="https://i.stack.imgur.com/uJ9uG.png" alt="Facebook Login error"></a></p>

<p>Which gives error as</p>

<pre><code>Cannot convert value of type '(FBSDKLoginManagerLoginResult!, NSError!) -&gt; Void' to expected argument type 'FBSDKLoginManagerRequestTokenHandler!'
</code></pre>

<p>and </p>

<pre><code>Cannot convert value of type '(_, _, NSError!) -&gt; Void' to expected argument type 'FBSDKGraphRequestHandler!'
</code></pre>

<p>This all errors are related to handler blocks in swift 3. I don't understand the errors and so that can't able to solve. Any help will be appreciated. Thanks in advance.</p>
