What changes will I have to perform after the facebook graph API change?

23 views
Skip to first unread message

HP

unread,
Sep 14, 2017, 2:40:13 AM9/14/17
to RestFB
I am the using the restfb library(version: 1.6.14) to perform Facebook related functionality in my application. Recently I got a notification from Facebook that "The application currently has access to Graph API v2.4 which will reach the end of its 2-year lifetime on 09 October, 2017. To ensure a smooth transition, please migrate all calls to Graph API v2.5 or higher." 
From the RestFB perspective do I have to do any changes to my current application ? 
Thank you. 

Norbert Bartels

unread,
Sep 14, 2017, 5:11:42 PM9/14/17
to RestFB
Hi,

first of all, it depends what you are doing. But in general it is a good idea to update RestFB, because the version you are using is rather old :)

So in particular you should use a `Version` while generating a `DefaultFacebookClient`. We recommend this because you have a better control over the API especially over the used versions. You can for example choose the 2.4 API and check if everything is working.

Then you have to add the `fields` parameter to your calls, because Facebook changed this in Graph API 2.4. You need to tell the API which fields in the returned object should be filled.

I think You should simply replace the jar and check what happens and work on the deprecated `FacebookClient` constructor ;)


Best regards
Norbert
Reply all
Reply to author
Forward
0 new messages