How do I fetch the facebook events of a particular location - facebook

I would like to fetch all the facebook events by passing a latitude or longitude or a place, As FQL support is no more, I've tried the following query
search?q=*&type=events&center=37.76,-122.427&distance=1000
But the results I get are from syria, India, USA, Hungary and all, why I'm not getting the events from only that location I've specified. Is there any legal issues in fetching the public events from facebook, How many number of eevnns I can fetch at a time??

There is no way to directly search for events in a specific area. The center and distance parameters are only available for Places, as you can read in the docs: https://developers.facebook.com/docs/graph-api/using-graph-api#search
More information:
https://www.facebook.com/help/community/question/?id=10201749749651827
How can I query public facebook events by location/city?
About "how many events can i fetch", those are the API rate limits: https://developers.facebook.com/docs/graph-api/advanced/rate-limiting
API results usually have a limit of 25 entries for one API call. But you can set it higher:
/search?type=event&q=test&limit=100
Legal issues depend on what you want to do with the data, impossible to say without knowing the details for your App.

Related

Microsoft Graph Api GET events showing details of private meetings in meeting room calendars

To collect data on the occupancy of rooms I am querying MS Graph API using the List Events endpoint
https://learn.microsoft.com/en-us/graph/api/calendar-list-events?view=graph-rest-1.0&tabs=http
The issue is that I need the number of occupants in a room and the time of a meeting however it seems to return information about Private events showing the name of the events plus the attendees. For privacy reasons, this data cannot be handed out around the organization. I have tried using getschedule API endpoint but this seems to not show enough data. i.e. doesn't show the number of attendees
Does anyone know if I am missing something with List Events on how to not look into details of Private Events?
https://graph.microsoft.com/v1.0/users/{UPN}/events$select=subject,body,bodyPreview,organizer,attendees,start,end,location

Facebook Graph API | Marketing Insights - Count Shares and Likes, Haha, Love...Etc for an AD

Is it possible to get Share Count as well the actions count for likes, ahah, dislike etc via the Facebook API / Marketing insights?
So far I'm able to get this data for posts(which are related to ads if promoted), but this is a lifetime metric I can't have the numbers in a daily basis, unless I calculate it by doing the difference once I have the data.
Also, I would never now, if the likes are being made by someone who saw my post somewhere because its promoted, or if that person went directly to my page.
Is there any way to achieve this results?
If you look at the actions field in insights, you should see a field called post_reaction which is the total number of reactions for your ad in the requested timeframe.
To get a daily breakdown, use time_increment=1 and time_range to specify the date range.
I don't believe we provide breakdowns on the different reaction types however.
Docs for parameters:
https://developers.facebook.com/docs/marketing-api/insights/parameters/v2.9

Maximum number of results for realtime API

We have a user who is getting 1000 results back from a realtime API query but is expecting more.
From the docs:
https://developers.google.com/analytics/devguides/reporting/realtime/v3/reference/data/realtime#resource
It does not appear that the realtime API response contains a facility for paging.
Is it correct to assume this API endpoint:
https://developers.google.com/analytics/devguides/reporting/realtime/v3/reference/data/realtime/get
Can return a maximum of 1000 results?
You need to remember that real-time is still beta. The real-time request doesn't include a next link which means there is no way to get extra data back.
Try setting &max-results=10000 see what that returns. The max rows for the Reporting API is 10000, however I have been unable to find any information on what the max number you can set in the Real-time API is. Real-time isn't returning an error if I set it to 10000 however I don't have an account with that many real-time users so I cant test it. I am going to send Google an email to see if I can get a verification what the max number is for the real-time api.
https://www.googleapis.com/analytics/v3/data/realtime?ids=ga:78110423&metrics=rt:activeUsers&access_token={accessToken}&max-results=10000
You might want to add a issue request to issues - google analytics requesting that they add nextlink at the very least.

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.

What is the best way to update a big number of accounts

I need your expert advice on this one.
I have been asked to analyse a potential Facebook application.
This application is a parental monitoring for kids accounts. Basically it will search a kid status message for specific keywords amongst others things. And this application will alert the parents when it finds something.
Of course this application will have a valid token to access the kid's data. This is not a tool to spy on the kid.
I am using the Graph API coupled with the 'since' keyword to get the last updates. It's working fine with a single user.
My question is about scalability.
How should I get updates of a huge number of kids to monitor? (between 10,000 and 100,000 accounts)
And for each kids I have to monitor status messages, videos, images, friend, friends' status messages...
Here are some numbers:
~2.1M requests each day to get hourly updates of 10,000 kids' account.
~57.8M requests each day to get hourly updates of 10,000 kids'account plus their friends', with an average of 40 friends each.
And as I read here, it would be limited.
So what do you reckon?
ps: Maybe with real-time updates I won't have this problem or would it be worse?
Yes I would subscribe to real-time updates so as an account gets updated you get a callback and then you get the latest updates. This would avoid the overhead of constantly polling accounts for updates. You will need to get an offline_access token for this to work as well.