简体   繁体   English

使用标准文本共享照片-Facebook iOS SDK 4.x

[英]share photo with standard text - Facebook iOS SDK 4.x

I need to post a picture on the user's wall with a standard text. 我需要在用户的墙上张贴带有标准文字的图片。 Can you do this with the FBSDK 4.x? 您可以使用FBSDK 4.x来做到这一点吗?

    let photoshare = FBSDKSharePhoto(image: recortarImagem(), userGenerated: true) 
    let content = FBSDKSharePhotoContent()
    content.photos = [photoshare]

    let dialog = FBSDKShareDialog()
    dialog.delegate = self
    dialog.shareContent = content
    dialog.fromViewController = self
    dialog.mode = FBSDKShareDialogMode.ShareSheet

    dialog.show()

As pointed out in the comments, this would violate the Platform Policy of Facebook (see 2.3, pre-filling at https://developers.facebook.com/policy/#control ). 正如评论中指出的那样,这将违反Facebook的平台政策(请参阅2.3,在https://developers.facebook.com/policy/#control处预填写)。

This being said, FBSDKSharePhoto has a field, caption that you can put a user-generated message in. 话虽如此, FBSDKSharePhoto有一个字段caption ,您可以在其中输入用户生成的消息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM