code: func (r *Response) AttachmentData(dataType AttachmentType, filename string, filedata io.Reader) error {
  
  	filedataBytes, err := ioutil.ReadAll(filedata)
  	if err != nil {
  		return err
  	}
  	contentType := http.DetectContentType(filedataBytes[:512])
  	fmt.Println("Content-type detected:", contentType)
  
  	var body bytes.Buffer
  	multipartWriter := multipart.NewWriter(&body)
  	data, err := createFormFile(filename, multipartWriter, contentType)
  	if err != nil {
  		return err
  	}
  
  	_, err = bytes.NewBuffer(filedataBytes).WriteTo(data)
  	if err != nil {
  		return err
  	}
  
  	multipartWriter.WriteField("recipient", fmt.Sprintf(`{"id":"%v"}`, r.to.ID))
  	multipartWriter.WriteField("message", fmt.Sprintf(`{"attachment":{"type":"%v", "payload":{}}}`, dataType))
  
  	req, err := http.NewRequest("POST", SendMessageURL, &body)
  	if err != nil {
  		return err
  	}
  
  	req.URL.RawQuery = "access_token=" + r.token
  
  	req.Header.Set("Content-Type", multipartWriter.FormDataContentType())
  
  	client := &http.Client{}
  	resp, err := client.Do(req)
  	if err != nil {
  		return err
  	}
  
  	return checkFacebookError(resp.Body)
  }
docs: // AttachmentData sends an image, sound, video or a regular file to a chat via an io.Reader.