Skip to content

Latest commit

 

History

History
52 lines (34 loc) · 1.68 KB

README.md

File metadata and controls

52 lines (34 loc) · 1.68 KB

LinkPreviewKit

Build Status Version License Platform

µLibrary to fetch the social media meta tag information from a website URL.

Supports Meta Tags for Standard Template (title and description), TwitterCard (twitter:) and OpenGraph (og:).

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

#import "LKLinkPreviewKit.h"

[LKLinkPreviewReader linkPreviewFromURL:URL completionHandler:^(NSArray *previews, NSError *error) {
    if (previews.count > 0  && ! error) {
        for (LKLinkPreview *preview in previews) {
            NSLog(@"title: %@", preview.title);
            NSLog(@"type: %@", preview.type);
            NSLog(@"URL: %@", preview.URL);
            NSLog(@"imageURL: %@", preview.imageURL);
            NSLog(@"linkDescription: %@", preview.linkDescription);
        }
    }
}];

Requirements

Installation

LinkPreviewKit is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "LinkPreviewKit"

Author

Andreas Kompanez, @kompozer

License

LinkPreviewKit is available under the MIT license. See the LICENSE file for more info.