Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"deprecated from Graph API 2.9" warnings for FBSDKShareLinkContent properties

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?

like image 458
Tamás Sengel Avatar asked Apr 21 '17 10:04

Tamás Sengel


2 Answers

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.

like image 93
Tamás Sengel Avatar answered Nov 15 '22 23:11

Tamás Sengel


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"/>
like image 45
ovidiur Avatar answered Nov 15 '22 21:11

ovidiur