I am adding references in slides created using beamer.Following the post in this link
I made a few modifications. The line that appears in the footnote stops in the middle of the frame. How do we extend it until the end of the frame/ how to remove the line?
\documentclass[xcolor={table,dvipsnames,usenames}]{beamer}
\begin{filecontents}{\jobname.bib}
@book{Saussure1995,
Author = {Ferdinand de Saussure},
Origyear = {1916},
Publisher = {Payot},
Title = {Cours de Linguistique G{\'e}n{\'e}rale},
Year = {1995}}
@book{Labov1972,
Address = {Philadelphia},
Author = {William Labov},
Publisher = {University of Pennsylvania Press},
Title = {Sociolinguistic Patterns},
Year = {1972}}
\end{filecontents}
\usepackage{natbib}
\usepackage{bibentry}
\bibliographystyle{apalike}
\usepackage{chngcntr}
\usepackage{subcaption}
\counterwithin*{footnote}{page}
\newcommand\footcite[1]{\footnote{\bibentry{#1}}\label{\thepage:#1}}
\newcommand\secondcite[1]{\textsuperscript{\ref{\thepage:#1}}}
\usepackage{graphicx}
\graphicspath{ {image/} }
\begin{document}
\nobibliography{\jobname}
\subsection{frame 6}
\begin{frame}{}
\begin{figure}[ht]
\centering
\begin{subfigure}{\linewidth}
\centering\includegraphics[width=4cm]{rabbit.png}
\end{subfigure}%
\begin{subfigure}{\linewidth}
\centering\includegraphics[width=4cm]{rabbit.png}\footcite{Saussure1995}
\end{subfigure}
\end{figure}
\begin{figure}
\includegraphics[scale=0.6]{image/image.png}
\caption{Steps }
\end{figure}
\end{frame}
\end{document}
Edit1: Also, for images how do we directly include the reference at the footnote without displaying the reference number next to the image.
Edit2: The size of the font in the footnote appears big. I tried reducing the size using \tiny \footcite{Saussure1995}. But this isn't reducing the font size. Any suggestions?
Edit3:Here is the code without \subcaption and without figure
\documentclass[xcolor={table,dvipsnames,usenames}]{beamer}
\begin{filecontents}{\jobname.bib}
@book{Saussure1995,
Author = {Ferdinand de Saussure},
Origyear = {1916},
Publisher = {Payot},
Title = {Cours de Linguistique G{\'e}n{\'e}rale},
Year = {1995}}
@book{Labov1972,
Address = {Philadelphia},
Author = {William Labov},
Publisher = {University of Pennsylvania Press},
Title = {Sociolinguistic Patterns},
Year = {1972}}
\end{filecontents}
\usepackage{natbib}
\usepackage{bibentry}
\bibliographystyle{apalike}
\usepackage{chngcntr}
\counterwithin*{footnote}{page}
\newcommand\footcite[1]{\footnote{\bibentry{#1}}\label{\thepage:#1}}
\newcommand\secondcite[1]{\textsuperscript{\ref{\thepage:#1}}}
\usepackage{graphicx}
\graphicspath{ {image/} }
\begin{document}
\nobibliography{\jobname}
\subsection{frame 6}
\begin{frame}{}
\includegraphics[width=.47\textwidth]{rabbit.png}\hfill
\includegraphics[width=.47\textwidth]{rabbit.png}\footcite{Saussure1995}
\vfill
\includegraphics[width=\textwidth,height=50pt]{image.png}
\includegraphics[scale=0.6]{image/image.png}
\caption{Steps }
\end{frame}
\end{document}
Edit5:
\documentclass[xcolor={table,dvipsnames,usenames}]{beamer}
\begin{filecontents}{\jobname.bib}
@article{aguiree2013idf,
title={IDF diabetes atlas},
author={Aguiree, Florencia and Brown, Alex and Cho, Nam Ho and Dahlquist, Gisela and Dodd, Sheree and Dunning, Trisha and Hirst, Michael and Hwang, Christopher and Magliano, Dianna and Patterson, Chris and others},
year={2013},
publisher={International Diabetes Federation}
}
\end{filecontents}
\usepackage{natbib}
\usepackage{bibentry}
\bibliographystyle{apalike}
\begin{document}
\nobibliography{\jobname}
\subsection{frame 6}
\begin{frame}{}
\begin{figure}
\includegraphics[width=.47\textwidth]{image/rabbit.png}\hfill
\includegraphics[width=.47\textwidth]{image/rabbit.png}
\vfill
\includegraphics[width=\textwidth,height=50pt]{example-image}
\caption{Steps}
\end{figure}
\vfill
\footnotesize Image credit: \bibentry{aguiree2013idf}
\end{frame}
\end{document}
An error is displayed while compiling the above, citation not found.

\usepackage{subcaption}changes the orientation of the images – Natasha May 06 '18 at 05:38subfigureorfigure. – leandriis May 06 '18 at 07:45subcaptionpackage, are you sure about your ECM? Which compilation engine do you use? – AndréC May 06 '18 at 08:26subcaption. I'm using sharelatex – Natasha May 06 '18 at 08:42subfigureorfigure– Natasha May 06 '18 at 08:43subfigureenvironment isn't defined by any of the packages you had (you get! LaTeX Error: Environment subfigure undefined.).subcaptiondoes define an environment like that, used in the way you did, so I assumed that package was just missing. Edit: I see you do by accident get some reasonable output if you skip through that error, but the code is still wrong withoutsubcaption. – Torbjørn T. May 06 '18 at 12:23subfigure. – Natasha May 06 '18 at 12:52