Pages like Facebook use OpenGraph information from web pages to create thumbnails of links. OpenGraph attributes describe the object represented on the web page. OpenGraph data is stored in meta tags, as shown in A.Krasniqi's answer:
<meta property="og:title" content="The Rock" /> <meta property="og:type" content="video.movie" /> <meta property="og:url" content="http://www.imdb.com/title/tt0117500/" /> <meta property="og:image" content="http://ia.media-imdb.com/images/rock.jpg" />
These meta tags are prefixed with og .
The main attributes of OpenGraph:
- og: title (object title)
- og: type (Object type, e.g. video.movie)
- og: url (permanent, canonical URL for this object)
- og: image (Image representing the page)
Other tags include:
- og: description (object description)
- og: video
- og: audio
All OpenGraph options are documented here.
You can use NSXMLParser , but others have implemented OpenGraph parsers. (Just google "iOS OpenGraph parser")
Palle
source share