Make sure the link starts with HTTPS. Social networks may not detect links without it, and the URL shortener only shortens links that start with https://.
Also, the preview only appears if you don't attach an image or video to the post. If you add media, the link stays in the text and the media is displayed.