Следующее это мой код:
Код: Выделить всё
let ph = FBSDKSharePhoto(image: UIImage(named:"testimage"), userGenerated: true)
//These properties you will get via the Get Code menu in facebook app dashboard (where you set up your Action, Object and Custom Story)
let properties: [NSObject : AnyObject] = ["og:type": "xxxx:quote", "og:title": "xxxx", "og:description": "Thank you ds sds dsd sd d ds لت"]
//Create the Open Graph object
let object: FBSDKShareOpenGraphObject = FBSDKShareOpenGraphObject(properties: properties)
//Create the action itself
let action: FBSDKShareOpenGraphAction = FBSDKShareOpenGraphAction()
//This comes from the same Get Code menu, but when you select to get the code for the action
action.actionType = "xxxx:share"
action.setObject(object, forKey: "xxxx:quote")
//Set the image as an Array, as here you can actually post more than one image
action.setArray([ph], forKey: "image")
//Create the content and add the action to it
let content: FBSDKShareOpenGraphContent = FBSDKShareOpenGraphContent()
content.action = action
content.previewPropertyName = "xxxx:quote"
//Execute the Share Dialog
FBSDKShareDialog.showFromViewController(self, withContent: content, delegate: self)
Код: Выделить всё
Error Domain=com.facebook.Facebook.platform Code=102 "(null)" UserInfo={error_reason=The operation couldn’t be completed. (FBAPIErrorDomain error 2500.), error_description=An error occurred during publishing., app_id=3313803xxxxxxx, error_code=102}
Ваше приложение использует плагин Share для обмена контент в Facebook, поэтому вам не нужно отправлять его на проверку. Publish_actions предназначен только для публикации через Graph API. Дополнительную информацию о плагинах см. в нашей документации по совместному использованию.
Как мне выполнить требования по публикации изображений и текста?
Подробнее здесь: https://stackoverflow.com/questions/457 ... n-facebook
Мобильная версия