Stop fb.me as contentTitle while sharing Link on Facebook using FBSDKShareLink?

186 views Asked by At

I am trying to share link on FB via FBSDKShareLink and I am providing a dynamic url to content.contentURL for callback to open my app. Now when I share on FB, the link always shows fb.me as content title and content discription. Can anyone guide me how to stop this?

let content: FBSDKShareLinkContent = FBSDKShareLinkContent()
let userInfo : AnyObject =  LocalStore.userDetails()!
let iosLink = responseDictionary?["fb_link"] as? String
let name = userInfo["name"] as? String
content.contentURL = NSURL(string: iosLink!)!
content.contentTitle = "click it"
content.contentDescription = "My Custom Description"
content.imageURL = NSURL(string: "http://weknowyourdreams.com/images/dog/dog-07.jpg")!
FBSDKShareDialog.showFromViewController(self, withContent: content, delegate: self)
1

There are 1 answers

0
Mr. Bean On BEST ANSWER

I needed to post the unique App-Linking url that opens my app to a specific page for that i was publishing the url generated from app's server end.

If i am sharing the above url by FBSDKShareLinkContent , then the url reads fb.me and there were no parameter to change this

Since fb reads the meta data to provide content title and content description, which the url was not having [ also fb do not allow to give meta data to the dynamic app linking urls] . I presented one fb sharing dialog box and and displayed the content which user wanted to share and then posted by graph api not from "fbsdkshare"