title: Swift Cannot assign through subscript: subscript is get only
body: <p>I am fairly new to the Swift syntax and am receiving this error with my code "Cannot assign through subscript: subscript is get only" </p>
  
  <p>This is from the line: <code>friendDictionary[(friendUID as? String)!]  = ["name": friendsData!["name"]]</code></p>
  
  <p>Any advice on the correct way of doing it would be very helpful.</p>
  
  <pre><code>  func getFriendsUIDs() {
  
          if FBSDKAccessToken.currentAccessToken() == nil {
  
              print("failed to start graph request")
              return
  
          }else{
          }
  
  
          if FBSDKAccessToken.currentAccessToken() != nil {
          }
  
  let parameters = ["fields": "name, id, picture"]
  FBSDKGraphRequest(graphPath: "/me/friends", parameters: parameters).startWithCompletionHandler {
  (NSURLConnection, result, requestError) in
  let friendIds = result["id"] as? NSDictionary
  let friendsData = friendIds!["data"] as? [NSDictionary]
  
          var ref: FIRDatabaseReference!
          ref = FIRDatabase.database().reference()
          ref.child("users").child((FIRAuth.auth()?.currentUser?.uid)!).child("friendUIDs").observeEventType(.Value, withBlock: { (snapshot) in
              self.FriendUIDs = NSArray()
              self.FriendUIDs = (snapshot.value as? NSArray)!
              print(self.FriendUIDs)
              var friendDictionary = NSDictionary()
              for friendUID in self.FriendUIDs {
                  friendDictionary[(friendUID as? String)!]  = ["name": friendsData!["name"]]
              }
  
              self.fetchFriendFeed(friendDictionary)
          }) { (error) in
              print(error.localizedDescription)
          }
  }
  
  }
  
  
  
  func fetchFriendFeed(friendDictionary: NSDictionary) {
  
  
  var ref: FIRDatabaseReference!
  ref = FIRDatabase.database().reference()
  
  for friendUID in FriendUIDs {
  
      ref.child("users").child(friendUID as! String).child("Agenda").observeEventType(.ChildAdded, withBlock: { (snapshot) in
  
          print(snapshot)
          if let dictionary = snapshot.value as? [String: AnyObject] {
              let friendPost = FriendPost()
              friendPost.picture = friendDictionary[friendUID as! String]? ["picture"] as? String
              friendPost.activity = dictionary["activity"] as? String
              friendPost.date = dictionary["date"] as? String
              friendPost.time = dictionary["time"] as? String
              friendPost.friendname = friendDictionary[friendUID as! String]?  ["name"] as? String
              self.friendPosts.append(friendPost)
  
              dispatch_async(dispatch_get_main_queue(), {
                  self.collectionView?.reloadData()
  </code></pre>