📘 Share the contents in the web view as QUOTE to Facebook.
FBQuoteWebView
uses the Facebook SDK (FBSDKShareKit).
If your project is not optimized to Facebook yet, you have to follow the Facebook iOS getting start guide.
Use CocoaPods.
pod 'FBQuoteWebView'
Just initialize and use FBQuoteWebView
same as UIWebView
.
NSString *demoURLString = @"https://github.com/KimDarren/FBQuoteWebView";
NSURL *demoURL = [NSURL URLWithString:demoURLString];
NSURLRequest *request = [[NSURLRequest alloc] initWithURL:demoURL];
_webView = [[FBQuoteWebView alloc] init];
[_webView loadRequest:request];
// Customizable menu title.
_webView.menuTitle = @"Share Quotes";
So simple, right?
There is a simple DEMO PROJECT using FBQuoteWebView
in Demo directory.
pod install
before run the demo project.
-
If users highlight any sentences in the
FBQuoteWebView
, they can see the Share To Facebook item. -
By touching the item, users can share the link with the QUOTE that they highlighted.
FBQuoteWebView is under MIT license. See the LICENSE file for more info.