Rico Cilliers made a great tutorial of using Blender for creating an image that follows your mouse cursor.
The video contains a very detailed explanation of using the new Facebook feature. Facebook uses depth-maps for telling which part of the image is the front and which part is the back.
Rico also noticed that the effect tends to work better if the image has a background which is blurred.
Make sure to subscribe for Rico for more 3D tutorials and lifehacks.