title: Sharing a story to Instagram with a background image and a sticker - IOS Swift
body: <p>I'm trying to share a story with a background image a a sticker image via URL Scheme on my ios app, i am using the attached code and it dose not work.
  When i'm trying to share just a background image or just a sticker it does work. But when im trying share both a background image and a sticker in top of it, it dose not work.</p>
  
  <p>Any Ideas?</p>
  
  <pre><code>func shareToInstagram(deepLinkString : String){
          let url = URL(string: "instagram-stories://share")!
          if UIApplication.shared.canOpenURL(url){
  
              let backgroundData = UIImageJPEGRepresentation(UIImage(named: "shop_placeholder")!, 1.0)!
              let creditCardImage = UIImage(named: "share_instagram")!
              let stickerData = UIImagePNGRepresentation(creditCardImage)!
              let pasteBoardItems = [
                                      ["com.instagram.sharedSticker.backgroundImage" : backgroundData],
                                      ["com.instagram.sharedSticker.stickerImage" : stickerData],
                                    ]
  
              if #available(iOS 10.0, *) {
  
                  UIPasteboard.general.setItems(pasteBoardItems, options: [.expirationDate: Date().addingTimeInterval(60 * 5)])
              } else {
                  UIPasteboard.general.items = pasteBoardItems
              }
              UIApplication.shared.openURL(url)
          }
  </code></pre>