Skip to content

kompozer/LinkPreviewKit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published