Facebook analytics gather anonymous data - facebook

Can I use facebook analytics to gather anonymous information about groups of people? ex: Want to see what the avg age ranges are of people attending a public event

Facebook Analytics does allow you to see aggregated and anonymized demographic data on groups of people who use your product.
For the example you mentioned, you will not be able to see the average age ranges of people attending a public event because there is no App Event for Facebook Page Events.
See the list of pre-defined Facebook Page Events supported by Facebook Analytics here. Pre-defined events and parameters for Facebook Pages is listed as Beta in the help documentation.

Related

Subscribe via webhook to a Facebook user's Activity Feed?

I'd like to use the GraphAPI and Webhooks to subscribe to a user's activity feed and extract information such as metadata and stats about the shared posts they like. (Yes, I am well aware of the privacy concerns and this will be handled extremely carefully.)
The closest question I could find is here:
Extract Links from Facebook activity feed
The other answers are not relevant, as they either discuss the old FQL or plugins or are specific to Pages.
I've been reading the GraphAPI documentation and the User Likes information only relates to the Pages they like (which doesn't change much). So this is a subset of the info needed - I need likes for Posts, not just Pages.
What I am really interested in is the objects to which a given user has reacted. You can easily see the reactions for everyone to a given post with a GET /v2.8/{post-id}/reactions HTTP/1.1 call. But this is "reactions by post" and I need "reactions by user".
The best solution I can figure out so far is to subscribe to their feed with a webhook and then collect a list of object IDs and then subscribe to their reactions for a certain period and filter by the user. This is not ideal or very efficient as it requires a fair number of subscriptions, and also only accounts for posts in the user's feed and not other posts they might have stumbled upon via some other means.
So - how to extract all User Like info?

Is there is any way to get public post of facebook by location ?

Hello i am new to Facebook graph api and looking for getting all the users public post in facebook by location using Facebook graph api .There are some existing apps like Geofeedia,COEverywhere, TrackinU which can get public posts of social networking sites by location . Is there is any way to get public post of an area in Facebook ?
Public Feed API
The Public Feed API displays a real-time feed of public posts for a specific word. Only public posts (from Pages and Profiles of those with ‘Follow’ turned on) are available with this API.
Keyword Insights API
The Keyword Insights API aggregates the total number of posts that mention a specific term in a given time frame. It can also display anonymous,
aggregated results based on gender, age and location.
Our current list of partners includes: Buzzfeed, CNN, NBC’s Today Show, BSkyB, Slate. and Mass Relevance.
These two tools are currently only available for a small group of trusted media partners.

How to get facebook groups (not pages) feed (posts' title+content)?

I've seen many posts around most of them are about pages or with outdated information.
I need to collect the feed (let's say last 10 posts: title + content) of 2 different Facebook groups in real-time (or almost) possibly in JSON in order to get real-time notifications about new posts (e.g. via kimonolabs service, but any other solution is accepted).
How do to that?
There are no realtime updates for groups. You would need to get the feed on your own - with a Cron Job, for example.
Be aware that you can only get access to groups you manage, with the user_managed_groups permission and the /group-id/feed endpoint.
Check out the API reference for example code and all the information you need: https://developers.facebook.com/docs/graph-api/reference/v2.4/group

How to get insights on a Facebook fan page without user login

I'm trying to figure out how to get the total number of comments, posts, likes and fans for any given Facebook fan page and date range using the Facebook API's. I need to be able to do this without the user having to log into Facebook to give the app permissions. This does seem to be possible, as this site is able to do it https://app.conversocial.com/profiler/ .But I don't know how they are doing it.
I've looked into the 'insights' fql table, but this always seems to return empty results. And I've also looked into the 'link_stats' fql table but this doesn't allow a date range to be set.
Does anyone have any idea on how to do this?
You are right. What they are doing is not possible by using the normal Graph API or/and the FQL.
However, Facebook also provides support for two other APIs:
Public Feed API
Keyword Insights API
Access to these APIs is restricted to a limited set of media publishers and usage requires prior approval by Facebook.
I think that they are using the Public Feed API. The documentation of the Public Feed API lists some of the publishers that have been using this API and the site you've mentioned in the question is not in the list. The documentation also doesn't mention anything about getting the Page Insights, but I think it might support this feature (as I see no other way of doing it).
Or, they might be using any other such restricted API which is not yet available to the public and not even documented on the developers website, but is currently in beta/testing phase.
To get the number of fans and the talkabout count, just query the appropriate Open graph ID for the relevant page. For example, for Coca Cola (https://www.facebook.com/cocacola) this is done via
https://graph.facebook.com/40796308305
To get all public infos (Posts etc) use the following request
https://graph.facebook.com/40796308305/feed?access_token={ACCESS_TOKEN}
where {ACCESS_TOKEN} can either be an App Access Token or a personal one. Consider that you can only see public entries.
The ability to query the date ranges is not provided via Facebook ad far as I know. I guess the https://app.conversocial.com/profiler/ application queries each page that is in its index once a day, and saves the results. That's how they're able to provide historical data.
You can try with the following FQL queries or graph API requests for facebook pages,
Graph API
http://graph.facebook.com/nb4cinema
FQL
SELECT name,about,description, fan_count,talking_about_count FROM page WHERE username= 'stackoverflowpage'
In case of FQL tables:
To read the page table you need
no access_token to get public information, or information about public pages that are not demographically restricted.
any valid access_token to get all information about a page that the current session user is able to see.
We have a test fan page. This has poor figures (<10 fans). Statistics are not available due to the lack of fans and likes on that page.
Allthough, conversocial spits out some statistics. They mixed fans and likes to some extent and so my impression is, that they simply parse the page code in order to get what you see.

Getting Facebook groups

My project is to get around 1000 Facebook groups and do some analysis of the data collected from those groups. Is there any way to accumulate Facebook group ID's (1000 or less) so that I don't have to manually search for each Facebook group. Is there a query or something that allows me to see Facebook groups based on category, etc?
Maybe I don't understand the question correctly, but facebook has a very convenient api for this:
https://graph.facebook.com/search?q=programming&type=group&access_token=lala
It is on the developer page: http://developers.facebook.com/docs/reference/api/
you can use
Batch requests in Graph API to get more ids at once
see https://developers.facebook.com/blog/post/2011/03/17/batch-requests-in-graph-api/