Detection of the ultranarrow temporal correlation of twin beams via sum-frequency generation