Facebook Graph API - Attending list length != attending_count - facebook

Graph API - Event: https://developers.facebook.com/docs/graph-api/reference/event/
When I get the attending_count of an event the API returns the correct number of people attending an event.
When I request the list of people going via attending (Edge) I'm getting less people.
The problem is that the attending (Edge) request does not only return names, but also the user id of each user. The ones who have their ID set to Friends-only in their privacy settings are not being listed.
I don't even need the ID, only the names. In my browser I can easily read ALL names, even of the people who set their ID to privat.
So is there away to get the names without the ID?
Tried to set the parameter fields to first_name only, so no ID, but still, it's giving me first_name AND ID of each attending user.

Some people may have disabled the Facebook Platform, so they don´t show up in the list - but they still add to the count.

Related

How to send message to specific facebook user from website?

My goal is to make a website, in which user could customize a photo and then provide his friends indicators like name or id. My next task is to fetch that info from database and send messages on specific date to provided users. Ex birthday wishes, greetings, and so on.
I studied facebook send api for a few days now and couldn't find solution for myself. If I want to send message, I need to have Page-scoped id of user, which is acquired when the person text you first, which is not desired, because person wouldn't know what it is.
Also I was looking into Customer matching API, also seems to require the same PSID. The next thing I checked was Send Dialog API, which seems to send messages instantly, but not on the specific date. Also I checked unofficial facebook-chat-api, which asks for user ID, whereas I can find my id, I couldn't find ids of my friends.
So I just want to know is it even possible, if yes, I'd really appreciate your help.
User to User communication is not possible (and not allowed) in an automatic way, there is no API for it except for the Send Dialog. The Messenger platform is for page to user communication only.
Do not use inofficial tools, they are not allowed and might get you banned.

Differentiate between Facebook user and event ID

How can I detect programmatically wether a Facebook ID user over event ID is? Are there any intervals where ID come from? I.e. 10211282278486891 is my user ID, and 1774156412659580 is an event ID. Looking for a fast way, without any web service call.
Search for fields specific for the user - for example, there is no "first_name" field in an event and you do not need extra permission to get that field.
/id?fields=first_name
Another solution that is probably better:
/id?metadata=1
With that API call, you get a "type" field that tells you if it´s a user profile or event.

Facebook User vs Event (get RSVP status for user on event)

Is there any better way of checking RSVP status of user (logged in our application) vs. specific Event through Graph API, than calling /v2.3/{user_id}/events and going through all events to find the one we're interested into and get the rsvp_status field there?
What I've tried, and what didn't work:
/v2.3/{user_id}/events/{event_id}
/v2.3/{user_id}/events?event={event_id}
/v2.3/{user_id}/events?event_id={event_id}
calling all of them, to find out if user is in any of RSVP groups: /v2.3/{event_id}/{attending|invited|maybe|declined|noreply}?user={user_id}
Also FQL is not a solution, if anybody wants to C&P existing FQL answers, because that's deprecated since API v2.0
This related answer is also wondering about efficiency on using Graph API, because pulling all user's events and going through them is both time and resource expensive operation
Ok, so I found the answer, which is quite simple:
/v2.3/{event_id}/invited?user={user_id}
Currently this method will
return nothing, if user is not yet part of event (was never invited and never attended/maybe himself)
return one object, with user object and his rsvp_status
/invited (what we've seen from testing) contains both users that were invited to the event, and users that joined the event themselves (so don't get confused by the word invited, at least unless facebook changes the API again)

Facebook Graph API Data Incorrect

Small problem here. I have an event created on Facebook and am using the Graph API to get the number of attendees.
I get the list of attendees with PHP from https://graph.facebook.com/EVENTID/attending?access_token=TOKENHERE and it returns a list of names.
However, the number of attendees is about 6 people lower than what is shown on the Facebook event page. Why would these numbers not match? Is there something in particular I'm supposed to do in the code to get the entire list?
As answered in the comments:
This discrepancy is probably down to a number of the attendees having opted out of Facebook Platform, which means their data isn't passed to apps via the API. Can't be 100% sure without the Event ID, but its a likely reason. – Simon Cross
From the Graph API, the people who have not joined the event will not show up under /{eventid}/attending, you need to add in the users who are returned in /{eventid}/not_replied. The not_replied set seems to be a special set in the GraphAPI.. and if you look at the docs, there is a mention of only people who have joined the event.

Twitter - get user_id or screen_name querying by user e-mail

I'm trying to get the user_id or screen_name querying per e-mails on Twitter.
We have a website and also a database of users. I have also all user's e-mail and I'd like to query if they have a Twitter account, and if so, get the screen_name or user_id....
I've read all twitter api documentation and it seems that I can query user only per screen_name or user_id...
http://apiwiki.twitter.com/w/page/24142947/Twitter-REST-API-Method:-users-lookup
https://dev.twitter.com/docs/api/1/get/users/search
Based on this query: api.twitter.com/1/users/lookup.xml?user_id=1401881,1401882
I tried this: api.twitter.com/1/users/lookup.xml?email=[e-mail]
Then I got this:
"Client application is not permitted to search with specified terms"
So it seems that Twitter knows this parameter "email" (otherwise it should show a error message)
Any idea?
That query is probably an internal method, if it's a method at all. Can't you just ask your users for a Twitter handle if they have one? Apparently when they did allows public access, it was mostly used for spam. Ultimately, there's no real need to have to find a user's Twitter handle by email when balanced out with the misuse that could be possible. According to the bottom of this post, there may be something coming in the future for authenciated partners.