Domanda

I can get users check-ins with Graph API but not with FQL.

SELECT place FROM stream WHERE filter_key = 'owner' AND with_location = 'true' AND type = 285

Returns empty result.

SELECT message FROM checkin WHERE author_uid = me()

This returns very old check-ins which is like deprecated table.

How can I get FQL query to work with current users check-ins?

È stato utile?

Soluzione

The problem here is that looks like Facebook deprecated checkin table and there are no new checkins here anymore. They started to use location_post table. So to get your checkins you may use

SELECT app_id, coords, author_uid, id, message, page_id, page_type, post_id, tagged_uids, timestamp, type FROM location_post WHERE author_uid = me()

Altri suggerimenti

Your attempt is very close. If you want to avoid returning old check-ins, add a where clause for timestamp. For example, if I want to get check-ins for myself during the last 6 months (2678400 seconds in a month), I would do:

SELECT author_uid, tagged_uids, target_id, coords, timestamp, message FROM checkin WHERE author_uid = me() and timestamp > (now() - (2678400*6))

If you want to grab checkins of friends, I would do:

SELECT author_uid, tagged_uids, target_id, coords, timestamp, message FROM checkin WHERE author_uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) and timestamp > (now() - (2678400*6))

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top