Facebook Watch Episodes API - facebook

Are there any Facebook APIs to retrieve the episodes of a show from Facebook Watch?
E.G. Get all the series and episodes in those series of https://www.facebook.com/sacredliesshow/
The closest I can find is https://developers.facebook.com/docs/graph-api/reference/video-list/#Reading but it's not clear how I should deduce the {video-list-id} from the page https://www.facebook.com/sacredliesshow/
Thanks

You should be able to get all video lists (including their IDs and names) for a page (based on ID) from here: https://developers.facebook.com/docs/graph-api/reference/page/video_lists/
That specific page's ID seems to be "454309158359123" (Extracted from the page's header section). However, given that the endpoint mentioned above is private I don't think you'll be able to use this if you don't actually own the page or have login access to it. Probably also why you can't just get the ID of video lists from their website by inspecting the source.

Related

Crawl Public Facebook Posts

I made a website where people can post links for other websites and then the backend generates a preview of the link (by using curl and parsing out the open graph tags available on most websites / by picking the first image, html title etc). Now, fine after some tweaking but sometimes I get some kind of rate limit.
Here is one example of a link I want to parse: https://www.facebook.com/HBR/posts/10157131816732787
I can parse it 4 ou 5 times and get a title, image etc but then if I repeat it I get sent to the login page of facebook. How can I avoid this?
I tried to parse the link at https://developers.facebook.com/tools/debug/sharing however it says "Facebook URLs cannot be crawled". So my question is: how am I even supposed to parse those links if they don't even allow it on their debugger?
Is there any kind of API that allows me to get this information without user login? I don't want to parse entire facebook pages, profiles etc, just get a preview for a link that my users might post on the website.
You MUST use the Facebook Graph API if you want to get data of Facebook Pages (or anything else on Facebook), scraping is not allowed.
In order to get data of Pages you do not own, you need to apply for Page Public Content Access: https://developers.facebook.com/docs/apps/review/feature/#reference-PAGES_ACCESS
An App Access Token (without Login) is sufficient in that case.
API Reference for Pages: https://developers.facebook.com/docs/graph-api/reference/page/
I dont think show.You can crawl post on public group using python selenium and beautiful soup

Get Share Count of Public Video with FB API v2.5

The Short Version:
"I can visit the public page without being logged into Facebook and see underneath the post is says "2155 shares" I would like to know how to access that number through the API"
The Details:
I'm trying to use the newest version (v2.5) of the graph HTTP API to determine the total share count for a public video. The problem is FB seems to have changed the API enough that older posts on SO no longer answer this question.
Looking at the Graph API Documentation it appears that video nodes now have the "sharedposts" edge. However, calling this route with summary=true only returns a few of the shares and no value for a total count. This returns counts for comments and likes so I'm not using the endpoints incorrectly or messing up my authorization.
I've also tried to use the URL Node but this doesn't seem to do much with links inside of Facebook. I simply get a JSON response with an 'id' field with the same url I supplied as a request parameter. Seems like this route is meant to be used for links to content outside of Facebook.
I've tried the above methods with multiple videos on multiple public pages so I don't think it is due to the group owners restricting access, unless this is the new default.
It seems arbitrary that I would be allowed access to total counts for comments and likes, but not shares. Is there some legacy way to do this or am I out of luck for now?
You should query the Post element containing the Video element.
Each video posted is also contained in a post element.
The post id is then composed of the video id prepended with the posting entities id (user, page etc'), separated with an underscore.
It then looks like: user-id_video-id.
Then using the Graph API to get the share count of a post is straightforward:
GET /v2.5/{post-id}?fields=shares
Example
Lets take a video from the BBC page:
https://www.facebook.com/bbcnews/videos/10153524838517217/
(Please tell me if the link is broken. I'll switch it to something newer :))
Video id : 10153524838517217
Page id (see below): 228735667216
--> Post id: 228735667216_10153524838517217
And the request would be:
GET /v2.5/228735667216_10153524838517217?fields=shares
(open in the Graph API explorer)
Page id
to get the page id, you could query the video element for the from field.
GET /v2.5/10153524838517217?fields=from

Post via open graph to Company Page NOT user

As I am learning and getting familiar with the FB OG API I am finding that I am lacking some of the basics. For example I see here that I use the action type news.publishes to post an article. However the access_token is for the user owning the page and thus it will go to their news feed and not the page (in this case their company page). Correct?
If I understand correctly then how does one get it to post to a specific page. Is there an access_token collection you iterate through till you find the one for the company page?
TIA
JB
You should be able to use /PAGE_ID/feed? Where page id is the numerical assigned by facebook..or the text friendly name you used.

facebook fanpage geotaggig map

Is there a way to have a map on my facebook fanpage with geotaggs from my photos similar with instagram map ??
I have a lots of pictures and i”ve put on everyone location so it would be nice to find a way to display my route on a map.
10x
I'm not going to provide full code for you to do this, but if you are prepared to put a little bit of code together, this should be pretty simple:
Get a list of photos from your Page. You can do this via Graph API with either the /pageid/photos or /pageid/tagged/ connections. You will of course require an access token in order to request this information.
This will give you a list of Photo IDs, so you should now iterate through these IDs one by one (or using Batch Graph API requests) and request the Graph API object for each Photo ID. In each object will be a place field (if the location has been tagged, and if the user whose access token you are using is able to view the photo) which contains a Place ID.
For each of those Place IDs, there may be (some Places lack this) a location field which will contain a latitude and a longitude.
Use these Geo-points with an API for Google, Bing or some other mapping software to create an HTML page with a map filled with markers that highlight each of the photos.
Use this HTML page as your Page Tab URL for a Facebook app and then follow these instructions to add this as a tab to your Facebook Page.
Done.

Show tagged images from facebook on website?

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.