I\'m trying to embed a link preview in an iOS application in the same way that Facebook does:
You can do this server-side or client-side.
Server-side, you can use a script (like the one you've built) to grab the tag of the HTML page.
Client-side you can download the whole page as HTML (as an example, Mashable is ~180KB) with NSURLConnection or a library like AFNetworking and parse it with a XML parser to find the tag.
I suggest you to create a server script, so you can reuse it in other projects or other platforms.