How to log a custom event with parms using Facebook analytics using swift
<p>I know this a basic question, but I can't work out how to log a custom event with custom parameters using facebook analytics. For example, I would like to log the following: </p>

<ul>
<li>song played</li>
<li>title</li>
<li>artist </li>
</ul>

<p>Please see the below code (which does not work):</p>

<pre><code>    let dict = AppEvent.ParametersDictionary(AppEventParameterName.Custom("title), AppEventParameterName.Custom("artist"))

    AppEvent.ViewedContent(contentType: "test", contentId: "test", extraParameters: dict)
</code></pre>

<p>I get the error message: </p>

<p>"Cannot invoke value of type 'ParametersDictionary.Type' (aka 'Dictionary.Type') with argument list '(AppEventParameterName, AppEventParameterName)"</p>

<p>I have also tried: </p>

<pre><code>let dict = AppEvent.ParametersDictionary(AppEventParameterName.Custom("title"), "test") 
</code></pre>

<p>Any help would be greatly appreciated. </p>