             return completion(urls: [])
         }
 
+        let URLTypeIdentifier = kUTTypeURL as String
+
+        let group = dispatch_group_create()
+
+        for extensionItem in extensionItems {
+            for attachment in extensionItem.attachments as! [NSItemProvider] {
+                if attachment.hasItemConformingToTypeIdentifier(URLTypeIdentifier) {
+
+                    dispatch_group_enter(group)
+
+                    attachment.loadItemForTypeIdentifier(URLTypeIdentifier, options: nil) { secureCoding, error in
+
+                        if let url = secureCoding as? NSURL {
+                            urls.append(url)
+                        }
+
+                        dispatch_group_leave(group)
+                    }
+                }
+            }
+        }
+        
+        dispatch_group_notify(group, dispatch_get_main_queue()) {
+            completion(urls: urls)
+        }
+    }
+
+    private func imagesFromExtensionContext(extensionContext: NSExtensionContext, completion: (images: [UIImage]) -> Void) {
+
+        var images: [UIImage] = []
+
+        guard let extensionItems = extensionContext.inputItems as? [NSExtensionItem] else {
+            return completion(images: [])
+        }
+
         let imageTypeIdentifier = kUTTypeImage as String
 
         let group = dispatch_group_create()


                    attachment.loadItemForTypeIdentifier(imageTypeIdentifier, options: nil) { secureCoding, error in

                        guard error == nil else {
                            dispatch_group_leave(group)
                            return
                        }

                        if let url = secureCoding as? NSURL {
                            urls.append(url)
                        }

                        dispatch_group_leave(group)


    override func didSelectPost() {

        postFeed(message: contentText, URL: urls.first) { [weak self] finish in

            print("postFeed URL finish: \(finish)")

            self?.extensionContext?.completeRequestReturningItems([], completionHandler: nil)
        }

        /*
        guard let item = extensionContext?.inputItems.first as? NSExtensionItem else {

            extensionContext?.completeRequestReturningItems([], completionHandler: nil)
