Skip to content

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

License

Notifications You must be signed in to change notification settings

smolskyaleksey/LinkPreviewKit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 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

Languages

  • HTML 88.3%
  • Objective-C 11.1%
  • Ruby 0.6%