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

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?

Related

Get impression or hit statistics on Facebook feed posts

Is there any way to get figures on the number of impressions, hits, or number of users that a particular Facebook post that is not part of a Page has been seen by?
To paraphrase, let's say that I make a post on my personal Facebook account, can I use the API (or another method) with my own access token to look up how much visibility this post has received?
The Insights APIs seem to be restricted to posts that are on a "Page", which from what I can see is distinct from a user's personal profile or feed.
Exactly, post insights are available for page posts only.
There isn’t a similar thing for posts on user timelines.
(If you are sharing content from your own domain, then Domain Insights might be able to give some data.)

Obtaining Facebook graph api data for user generated posts

I am having some trouble determining how to go about a certain issue. I am pretty new at trying to obtain social media data. Say an internet user publishes something that is essentially a post from from a website that is external to Facebook, to the user's Facebook feed. Is there a way to obtain the amount of likes, shares, comments, and other insight type data from those posts? I'm aware/currently learning about Facebook's open graph api, but I am unsure if it allows for this type of query. It seemed to be primarily for people, pages, and places, and I have not found a way to query only posts from a website specifically.
To be more detailed, a user will have the option of posting a jpeg type image to their Facebook feed. This is for a single website, where the website would like to do this in order to gauge how those posts are being perceived and interacted with by other Facebook users. Is there a way to obtain data on these specifically?
Also, if so, is there a way to tag or apply specific identifications to categories of these posts in some way before they are posted by the user to their feed, to allow for segmentation of the data? Any help is very much appreciated.

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

Reading user's posts to pages

For a given Facebook user, is there a possibility to read all posts that he's made to any pages? On FB web, these can be found in the activity log, but so far I couldn't find a method to get them via API.
Both /user/posts and /user/feeds only contain status and profile updates, not posts to pages. I know I can read /page/feed and use paging to find this user's posts for any page the user likes, but how about those he doesn't?
No, outside of FQL, there is nothing in the API that accomplishes this. I'd imagine this to be a pretty data intensive call with minimal use cases however, so I don't think this will be introduced anytime soon.

Facebook PHP SDK limitations

I am developing a page on my site that pulls in analytics data from Facebook posts and pages, and have began with trying out the PHP SDK for Facebook.
The documentation seems to have improved in the last few months since the last time I used it, but as there is so much going on, I find it difficult to find the exact answer to my questions sometimes.
I want to get the analytics data for a number of posts and pages which are not necessarily related to each other... and also want to do this without logging in via Facebook. Is there some sort of simple API key I can use, which skips the logging in stage? I want a number of different peple to go to the site and see info from a number of different posts and pages.
Hope this makes sense.
You'll be able to get limited data from public pages and posts without logging in. Data includes number of likes, public page information, comment and likes on posts etc.
For example, if I look at the following Page https://graph.facebook.com/thetimberyard, I can see various stats like:
checkins
talking_about_count
were_here_count
likes
However, you can get better insights if you ask the user to login with read_insights permission. This permission will give you access to full insights for pages you own. Extra insights include (but not limited to):
Daily New Likes
Daily Unlikes
Daily Non/Logged-in Page Views
Weekly Non/Logged-in Page Views
Daily Internal Referrers
Daily External Referrers
Daily/Weekly/Monthly People Talking About This
Daily/Weekly/Monthly Reach Demographics, etc.