Reputation: 2302
It is said that FQL will be no longer available:
FQL is still available in version 2.0, but will not be available in the next version of platform. This early warning is given so that developers can start migrating off FQL to the Graph API as soon as possible. https://developers.facebook.com/docs/apps/upgrading
If you need to migrate your FQL queries to Graph API, which pitfalls you might encounter ?
Upvotes: 2
Views: 865
Reputation: 533
It seems to me that the issue is that you will need to do more api requests for the same result.
If you want to find all the events that have been published by the pages you follow you can run the following fql query:
SELECT eid, name, start_time, end_time, location, venue, description
FROM event WHERE eid IN ( SELECT eid FROM event WHERE creator IN
(SELECT page_id FROM page_fan WHERE uid = 'YOUR_UID') )
ORDER BY start_time desc AND start_time > now()
This will return the all the events together. To replicate this in the graph api you would need to to make many more requests. So with the following pseudo code:
my_likes = request /me/likes
for each page_id in my_likes
events[page_id] = request /{page_id}/events
we get one request for your list of pages and then one request for each page (which might be in the hundreds) as opposed to just one fql query in the first example.
EDIT::=============================================
The way to avoid the increase in http requests is to use the graph api's nested request syntax (as pointed out by the OP in his comment).
This allows you to chain requests so they are performed on the server side before being returned to your app. So the above request, if rewritten in the nested request syntax, becomes
https://graph.facebook.com/v2.0/me?fields=likes.fields(events)
where the second request for the events field is being made on each of the page nodes returned by the first request (in the example all of the pages a user has liked). So in fact, the removal of FQL here results in a much more concise query string.
Upvotes: 1
Reputation: 268
as a matter of fact, some tables are deprecated.
for sure I know -
location_post (and likely checkins as well)
mutual_friends_count field in users table is almost always returning null now (which is a consequence of the whole 'you don't know who's your friend' change I suppose)
Upvotes: 0
Reputation: 20753
If you need to migrate your FQL queries to Graph API, which pitfalls you might encounter ?
As such no pitfalls, the basic and relevant fields that you access from the fql tables are available with the Graph API endpoints too. But yes, some of fields may not be - the only pitfall!
Upvotes: 0