所以,我在iOS上使用Facebook共享sdk,只想通过测试用户分享示例内容。我已使用权限登录:
loginButton.publishPermissions = ["publish_actions"]
loginButton.readPermissions = ["public_profile", "email", "user_friends", "user_likes"]
我正在这样分享:
let action = FBSDKShareOpenGraphAction()
action.actionType = "og.likes"
action.setString("http://samples.ogp.me/226075010839791", forKey: "object")
let content = FBSDKShareOpenGraphContent()
content.action = action
content.previewPropertyName = "object"
let shareAPI = FBSDKShareAPI()
shareAPI.delegate = self
shareAPI.shareContent = content
let shared = shareAPI.share()
print("shared: \(shared)")
我得到了以下结果:
shared:true
didCompleteWithResults [postId:122321171486204, completionGesture:post]
看起来它有效,对吗?但后来我登录该帐户,看不到任何东西。它说:“没有帖子可以看”。此帐户也有朋友,他们也看不到任何东西。
为什么会这样?