简体   繁体   English

如何在iOS的FBSDK中标记Facebook页面

[英]How to tag a facebook page in FBSDK for iOS

While using the FBSDK for iOS, I am trying to attach/tag a relevant facebook page. 在使用FBSDK for iOS时,我试图附加/标记相关的Facebook页面。 Any pointers to their docs? 任何指向其文档的指针? I looked up some info on message_tags parameter but not sure how to use it. 我在message_tags参数上查找了一些信息,但不确定如何使用它。

let shareParams = ["message":"Check out this page @PAGE_NAME"]
let fbRequest = FBSDKGraphRequest.init(graphPath: "me/feed", parameters: shareParams, HTTPMethod: "POST")
fbRequest.startWithCompletionHandler { (connection :FBSDKGraphRequestConnection!, result, error) -> Void in

  if let responseError = error {
    if responseError.domain == FacebookSharerErrorDomain.FacebookAPIError.rawValue {
      self.handleFacebookAPIError(responseError)
    } else {
      Error("Unable to share")
    }
  } else {
    Success("Shared to Facebook")
  }

}

I think this is what you looking for (if anchor didn't work refresh page. or search "Mentioning Friends or Pages" section). 我认为就是您要寻找的内容(如果锚点无法正常工作,请刷新页面。或搜索“提及朋友或页面”部分)。

Also look at taggable_friends endpoint. 另请参阅taggable_friends端点。

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

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