µ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:).
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);
}
}
}];
LinkPreviewKit is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "LinkPreviewKit"
Andreas Kompanez, @kompozer
LinkPreviewKit is available under the MIT license. See the LICENSE file for more info.