title: Facebook SDK Swift - Use of undeclared identifier
body: <p><strong>I am getting <code>Use of undeclared identifier</code> for every Facebook Object I use</strong> </p>
  
  <p>Following this tutorial:
  <a href="http://www.brianjcoleman.com/tutorial-how-to-share-in-facebook-sdk-4-0-for-swift/" rel="noreferrer">TUTORIAL: HOW TO SHARE IN FACEBOOK SDK 4.1.X FOR SWIFT</a></p>
  
  <p>But I've got the following error:</p>
  
  <p><a href="https://i.stack.imgur.com/okfiH.png" rel="noreferrer"><img src="https://i.stack.imgur.com/okfiH.png" alt="enter image description here"></a></p>
  
  <p>I've added Facebook framework via cocoapods:</p>
  
  <pre><code>pod 'FBSDKCoreKit'
  pod 'FBSDKShareKit'
  </code></pre>
  
  <p>And it was installed successfully</p>
  
  <p><a href="https://i.stack.imgur.com/MYrcp.png" rel="noreferrer"><img src="https://i.stack.imgur.com/MYrcp.png" alt="enter image description here"></a></p>
  
  <p>I've added bridging header</p>
  
  <pre><code>#ifndef Bridging_Header_h
  #define Bridging_Header_h
  
  #import &lt;FBSDKCoreKit/FBSDKCoreKit.h&gt;
  #import &lt;FBSDKShareKit/FBSDKShareKit.h&gt;
  
  #endif /* Bridging_Header_h */
  </code></pre>
  
  <p>The bridging header is connected:</p>
  
  <p><a href="https://i.stack.imgur.com/P2j1H.png" rel="noreferrer"><img src="https://i.stack.imgur.com/P2j1H.png" alt="enter image description here"></a></p>
  
  <p>I've configured my .plist</p>
  
  <pre><code>&lt;key&gt;CFBundleURLTypes&lt;/key&gt;
      &lt;array&gt;
          &lt;dict&gt;
              &lt;key&gt;CFBundleURLSchemes&lt;/key&gt;
              &lt;array&gt;
                  &lt;string&gt;fb*****&lt;/string&gt;
              &lt;/array&gt;
          &lt;/dict&gt;
      &lt;/array&gt;
      &lt;key&gt;FacebookAppID&lt;/key&gt;
      &lt;string&gt;*****&lt;/string&gt;
      &lt;key&gt;FacebookDisplayName&lt;/key&gt;
      &lt;string&gt;*****&lt;/string&gt;
      &lt;key&gt;NSAppTransportSecurity&lt;/key&gt;
      &lt;dict&gt;
          &lt;key&gt;NSExceptionDomains&lt;/key&gt;
          &lt;dict&gt;
              &lt;key&gt;facebook.com&lt;/key&gt;
              &lt;dict&gt;
                  &lt;key&gt;NSIncludesSubdomains&lt;/key&gt; &lt;true/&gt;
                  &lt;key&gt;NSThirdPartyExceptionRequiresForwardSecrecy&lt;/key&gt; &lt;false/&gt;
              &lt;/dict&gt;
              &lt;key&gt;fbcdn.net&lt;/key&gt;
              &lt;dict&gt;
                  &lt;key&gt;NSIncludesSubdomains&lt;/key&gt; &lt;true/&gt;
                  &lt;key&gt;NSThirdPartyExceptionRequiresForwardSecrecy&lt;/key&gt;  &lt;false/&gt;
              &lt;/dict&gt;
              &lt;key&gt;akamaihd.net&lt;/key&gt;
              &lt;dict&gt;
                  &lt;key&gt;NSIncludesSubdomains&lt;/key&gt; &lt;true/&gt;
                  &lt;key&gt;NSThirdPartyExceptionRequiresForwardSecrecy&lt;/key&gt; &lt;false/&gt;
              &lt;/dict&gt;
          &lt;/dict&gt;
      &lt;/dict&gt;
  </code></pre>
  
  <p>Here is the code:</p>
  
  <pre><code>let content : FBSDKShareLinkContent = FBSDKShareLinkContent()
          content.contentURL = NSURL(string: "&lt;INSERT STRING HERE&gt;")
          content.contentTitle = "&lt;INSERT STRING HERE&gt;"
          content.contentDescription = "&lt;INSERT STRING HERE&gt;"
          content.imageURL = NSURL(string: "&lt;INSERT STRING HERE&gt;")
  
          let button : FBSDKShareButton = FBSDKShareButton()
          button.shareContent = content
          button.frame = CGRectMake((UIScreen.mainScreen().bounds.width - 100) * 0.5, 50, 100, 25)
          self.view.addSubview(button)
  </code></pre>