Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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
Branch: master
Failed to load latest commit information.
GetOgImage.xcodeproj changed readme for usage of library
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.

Something went wrong with that request. Please try again.