I do not have an app with the "Pages Public Content Access" permissions nor do I have one planned. My family would like to aggregate all the comments from my 100-year-old grandma's viral video to make a collage or something special for her birthday that includes all the wonderful comments. Is there anyway I can get access to only this url or workaround to retrieve this information?
Related
I want to make an application that needs to collect some public data from facebook.
Specifically I need to check reactions and comments made on public posts.
I've noticed two things:
First, According to https://www.facebook.com/apps/site_scraping_tos_terms.php,
scraping is not allowed unless facebook gives you a written permission. (of which how do I ask for permission anyway?)
Second, as far as I see the graph api doesn't allow to get information regarding posts made by another user/page. Am I wrong?
How do I get the information I need in a legal way and is it even possible?
To get public posts in a page and reactions and comments on these posts your app will need will need Page Public Content Access permission. If you have not already created the app, you can find how to do this in this link and how to review your app for permissions in this link.
Once you have the permission you can get public posts from a page using below API request:
https://graph.facebook.com/<PAGE_ID>/posts?access_token=<ACCESS_TOKEN>&fields=name
Get the id of posts you need details for from the response of the above request
Then you can use the below request's to get reactions and comments of the post based on the post id
Get total reactions:
https://graph.facebook.com/<POST_ID>?fields=reactions.summary(true)&access_token=<ACCESS_TOKEN>
Get total reactions of a specific type (NONE, LIKE, LOVE, WOW, HAHA, SAD, ANGRY, THANKFUL, PRIDE):
https://graph.facebook.com/<POST_ID>?fields=reactions.summary(true).type(<REACTION_TYPE>)&access_token=<ACCESS_TOKEN>
Get comments:
https://graph.facebook.com/<POST_ID>?access_token=<ACCESS_TOKEN>&fields=comments.summary(true).limit(999).filter(stream).fields(id,message,created_time,parent)
And as for public posts by a user you will be able to get the total reactions with the same request by providing the post id if the post is public, but you cannot get the comments, however you will get the comments count
I'm trying to get ALL comments (and the replies to those comments) from a Facebook page and an specific date range on API Graph.
Not just the comments from me/posts or me/feed, but all the comments my Fanpage gets, including those from Events, Products, Photos (because if you post a collection of photos the me/posts edge just include the main posts, not every single photo attached in the post), Videos, Live Videos, Offers, and, if its possible, Dark Posts (from Facebook Ads).
Is there a way to make this? I tried using me/notifications edge but most of the notifications group several comments together in a single object (E.g. "Bob, John and Mary commented on the link you shared.").
By the way, there is actually and app that makes this, called "Feed Comments" (id=9675640871), actually the responsible to send the notifications when your fanpage gets a comment.
But I don't know how it makes it.
Thanks!
Reading through the FB documentation I'm not sure how to approach this or if it is even possible with open graph.
I'm looking to create a story for a iOS app that will post an image taken by the user, along with title and description written by the user. This will deep link back into the app. Looking at the open graph documentation it looks like that is meant only for known and public accessible content. For example books read, movies watched, achievements earned for games etc.
Can I create user driven posts with open graph, or is it really the Graph API I should be looking at?
Main goal is too keep the content private and only viewable to those users the content has been shared with. Seems any open graph solution would make posts accessible by visiting a og: page with the right variables, no auth needed.
I don't totally understand everything you are asking (and I'm pretty new to all of this too) but here's a link on how to have a user post an image and message. You do need an auth though.
https://developers.facebook.com/docs/opengraph/howtos/adding-photos-to-stories/
Similar to the ability to subscribe to a user's posts on Facebook, users can since today, follow other users' Open Graph activities from a specific app. For example, on a movie review site, users can follow their favorite movie reviewers.
There's no example of this yet, but if you submit the new follow action you'll get the code and have an idea of how it goes. It's very easy: hit(GET) https://graph.facebook.com/me/og.follows with a token and a profile ID. What I don't get is the third_party_id.
I have read this sentence over and over and still can't decode it: "This tag is not required, and follow actions will succeed without it, though followers will not see activity in their News Feeds without this."
How to use the third_party_id? And most important, from now on, only the actions from the the people I subscribe to will been seen on my feed?
Full info here: https://developers.facebook.com/docs/opengraph/actions/builtin/follows/
What I don't get is the third_party_id.
If you’re posting a follow action not for a facebook profile, but for an URL (as in the example, profile=http://www.rottentomatoes.com/celebrity/tom_hanks/), then that page has to have a <meta property="fb:profile_id" …> element to tell Facebook what to actually follow.
To get the third_party_id, you query the Graph API for a user with /userid/?fields=third_party_id.
(I’m guessing using the third_party_id in this place instead of the actual user id is just recommended for the simple reason, that this way not everyone who looks into the HTML code of the rottentomatoes page can see what FB uid Tom Hanks actually has.)
If there is no corresponding user on Facebook for the URL that’s being followed – then there isn’t anything to follow at all, because there will be no posts on Facebook that could been shown in a user’s feed.
How to use the third_party_id?
This could have been explained better by Facebook. I think it works like this:
Lets say William followed Claudette in your app and that your app successfully published a follow action on facebook. Whether you provide Claudette's third_party_id or not, a story that William followed Claudette, will get published on William's News Feed.
However if Claudette's third_party_id is provided, then William will start getting stories about ALL of Claudette's actions published by your app. Now, thats pretty cool. But of course to do this, Facebook needs to know "who Claudette is" which is what third_party_id does.
To summarize, by not providing third_party_id the follow action gets shared on William's news feed and potentially to William's friends. But thats a one time thing. By providing the third_party_id you are extending the virality and ensuring a constant flow from Claudette to William for actions Claudette does on your app.
I am trying to achieve similar functionality to the one shown here...http://blackmilkclothing.com/collections/leggings/products/circuit-board-grey-leggings
there fan page https://www.facebook.com/blackmilkclothing allows people to hash tag a photo and then populate it on their website like the link above.
Loading a series of tagged images from my facebook fan page to my website. I am not positive how this is acheived? I am assuming some kind of api process but any help in the right direction would be appreciated.
Thanks! All help is appreciated
See the 'tagged' connection of a Page in the Graph API: https://developers.facebook.com/docs/reference/api/page/
It returns a list of objects the page is tagged in, including photos
If you need background knowledge I suggest these links in particular:
Graph API overview: https://developers.facebook.com/docs/reference/api/
Page login: https://developers.facebook.com/docs/authentication/pages/
After a good bit of trial and error I've found the most efficient way to query photos tagged to a particular Facebook page is to use Facebook's FQL interface to retrieve a list of stream posts.
With FQL you can limit the queried objects to only those posts containing images (unlike with the higher-level Graph API calls which will return all posts, many of which may not have associated photos), and you'll also have more granular control over composition of the result set.
Keep in mind that Facebook doesn't have true hashtag support (only Facebook pages can be tagged), so to simulate the hashtag support that Black Milk Clothing encourages, you'll need to parse and filter the photo message text yourself.
As an alternative quick and easy solution, I've rolled the results of my efforts into a free online service called TagTray -- with TagTray I've added an interface for building and curating hashtag based galleries from Facebook, Instagram, and TwitPic (including application-level Facebook hashtag filtering) that can be framelessly embedded into a site with a few lines of JavaScript.