"deprecated from Graph API 2.9" warnings for FBSDKShareLinkContent properties
Asked Answered
S

2

8

When I try to pass an FBSDKShareLinkContent to an FBSDKMessageDialog, it returns with warnings for some properties, saying that those are deprecated from Graph API 2.9.

'imageURL' is deprecated: imageURL is deprecated from Graph API 2.9

'contentTitle' is deprecated: contentTitle is deprecated from Graph API 2.9

'contentDescription' is deprecated: contentDescription is deprecated from Graph API 2.9

What can I do in order to prevent this issue?

Sanfred answered 21/4, 2017 at 10:41 Comment(0)
S
12

The methods that allow attaching a link to posts now retreive the image, the title and the description from proprietary meta tags and not from the code itself. Simply remove the lines to get rid of the warnings and set up the proper tags on the site itself.

See the exact deprecation changelog here.

Sanfred answered 21/4, 2017 at 10:41 Comment(2)
I have no access to the backend so I can't setup Open Graph on it. I need to post URL and image. Am I completely out of luck?Unlearned
@PavelAlexeev I'm in the same spot you are right now - you find any work around? I'm using JS though as opposed to ios.Perilune
S
2

So you are not alowed to use those properties anymore (graph 2.9) when you are sharing a link via facebook. All the informations facebook needs will be gathered from the "og" tags ("og:title", etc..) in the web page meta tags you want to share.

In the element of your web content you should have :

<meta property="og:title" content="your content"/>
<meta property="og:description" content="your content"/>
Stephanystephen answered 20/6, 2017 at 13:1 Comment(1)
Can you share a link to this document?Perseverance

© 2022 - 2024 — McMap. All rights reserved.