Library to get og:image with sample project. The URL of og:image is got from regular expression finding with whole HTML. The character encoding must be set to proper one.
Objective-C
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
GetOgImage.xcodeproj
GetOgImage
readme.md

readme.md

Objective-C Library to get og:image

Usage

  1. import library files: NSURL+OgImage.h/m
  2. import library files: NSString+Encode.h/m
  3. write code like below:

Code

NSData *d = [NSData dataWithContentsOfURL:[NSURL ogImageURLWithURL:url]];
imageView.image = [UIImage imageWithData:d];

Sample project

A project with one text field and one image view. When you enter the URL, the og:image of the web page will be shown.

For example, in the below screenshot, the URL is http://www.nicovideo.jp/watch/1343369790

Screen Shot

Licence

This library is under MIT licence.