![]() ![]() Note: You will not be able to test this in the Simulator, you’ll need to test on your device. People need the native Facebook for iOS app installed, version 7.0 or higherīuild your share content for photos with the FBSDKSharePhotoContent model.People can share photos from your app to Facebook with the Share Dialog or with a custom interface: Let button : FBSDKShareButton = FBSDKShareButton()īame = CGRectMake((UIScreen.mainScreen().bounds.width - 100) * 0.5, 50, 100, 25) Let content : FBSDKShareLinkContent = FBSDKShareLinkContent() Here’s the code to show and execute the Link button: ImageURL – the URL of thumbnail image that appears on the postĬontentDescription – of the content, usually 2-4 sentences When people share links from your app to Facebook, it includes attributes that show up in the post:ĬontentTitle – represents the title of the content in the link Add the Facebook Share buttons to your ViewController.swift.Add the following import statement to your Bridging-Header.h, right below the Core Kit entry.Drag it or add it using the “Linked Frameworks and Libraries” within your target settings. Add the FacebookSDKShareKit.Framework & amework to your project just like your did with the FacebookSDKCoreKit.Framework.To begin, follow the steps in this article to integrate the Facebook SDK and implement Facebook Login: Tutorial: How To Use Login in Facebook SDK 4.0 for Swift. You can share three different types of content using Facebook, they are Links, Photos & Videos. In this tutorial we’ll cover how to integrate Facebook Share into your app using the native Facebook 4.0 SDK using Swift. ![]() This will require that a user is logged into Facebook using Facebook Login. The other option is to use the native Facebook SDK. If you want to go this route, read my article about it here: Tutorial: Share on Twitter and Facebook in Swift. The first and easiest is using the existing Social Framework that is embedded in iOS. There are a couple of ways to integrate Facebook Sharing into your app.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |