如何在iOS App中的所有社交网站上与描述或标题共享图像

时间:2017-12-19 09:38:14

标签: ios swift facebook

我想在所有社交网站(如facebook,google,LinkedIn等)上分享带有标题或说明的图片。但是当用户点击图片时,一个链接就会打开,如何整合它。我正在搜索很多并找到一个集成社交网站的所有SDK的解决方案。我正在尝试与Facebook集成以与链接共享图像。但我无法分享。当我在Facebook上分享图像时,我面临下面的问题。我为facebook分享实现以下所有问题。但是我失败了。请告诉我在我的代码中我做错了什么来解决我的问题。还有其他任何解决方案请告诉我

error Domain=com.facebook.Facebook.platform Code=102 "(null)" UserInfo={error_reason=The operation couldn’t be completed. (FBAPIErrorDomain error 100.), error_description=Failed to authenticate the application because of app name mismatch.  Please check the application name configured by the dialog., app_id=00000000000, error_code=102

<key>LSApplicationQueriesSchemes</key>
    <array>
        <string>fbapi</string>
        <string>fb-messenger-api</string>
        <string>fbauth2</string>
        <string>fbshareextension</string>
    </array>

let content = LinkShareContent(url: URL(string: "https://www.google.co.in/")!, title: "google", description: "google.com", quote: "", imageURL: URL(string: "https://www.google.co.in/1513255170789.jpg"))

 let shareDialog = ShareDialog(content: content)
        shareDialog.mode = .native
        shareDialog.failsOnInvalidData = true
        shareDialog.completion = { result in
            // Handle share results
        }

        try? shareDialog.show()

0 个答案:

没有答案