Facebook API get events CREATED by friends

I am developing a facebook application that should retrieve events created by some of my friends. A standard SQL query will look like this:

NSString *fql1 = @"SELECT "
 @"eid, name, tagline, id, pic_small,host, description, start_time, creator "
 @"FROM "
 @"event "
 @"WHERE "
 @"creator = 1111111111 OR creator = 2222222222 OR creator = 333333333";

Facebook only allows you to filter tables by indexed fields (this is the eid in this table). I guess I can build multivariance. Can anyone help with this? I spent some time searching without looking. I only need one request, so training the whole fbl for this currently does not make sense.

BTW: there is a function events.get - you can filter using uid (the documentation says):

: uid - Filters events related to the user with this uid.

ASSOCIATION In what sense ? Are these creators ?, invited, visiting, or can? Why is facebook documentation so frustrating? When I try event.get with the uid parameter, it returns a result with different creator identifiers than the uid parameter. Graph API function: uid/eventsreturns events. The user was invited to visit, attended or other status, but was not necessarily created by him.

What am I missing here? I provided the necessary permissions for my application, it connects, receives lists of friends' events, but not the events that I want.

It seems so simple, but I did not find a direct solution.

I would appreciate any help.

+3
source share
1 answer

- :

SELECT 
    eid, name, tagline, pic_small,host, description, start_time, creator 
FROM 
    event 
WHERE 
    eid IN (
        SELECT 
            eid 
        FROM 
            event_member 
        WHERE 
            uid=111 OR uid=222) AND 
    (creator=111 OR creator=222)

, 111 222 , , . eid , FQL (creator = 111) .

+3

Source: https://habr.com/ru/post/1764720/


All Articles