Facebook Graph API get links and photos - facebook

We manage to get a page uploaded photos, or links in separate requests, but we would like to get it all in 1 line, including user photos and links together (public page).
Is there a way to get both in 1 request?
https://graph.facebook.com/id/photos/uploaded Photos
https://graph.facebook.com/id/links Links
If you get the feed of a page, all pictures are very small , and I need a big image :
https://graph.facebook.com/id/feed/

Use the attachments field under the feed connection
https://graph.facebook.com/id/feed?fields=link,attachments

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

How to get the images of a facebook album using graph API

I want to get the links of Facebook photos in albums posted from a page that I am managing. I tried to use facebook graph API. I could get the names and ids of albums via "{page_id}/albums/" . Then I tried to use the album id/?fields=photos{link} to get the link. But here it will provide facebook link (eg:https://www.facebook.com/page_name/photos/a.193909724216/193907241065159/?type=3)
But I want to show this images on a page. So I want the real image path. (eg:https://scontent.fcmb1-1.fna.fbcdn.net/v/t1.0-9/38801583_193907078972459378765588463616_o.jpg?_nc_cat=0&oh=6bdfdfc0cc225a1f035295bb2e2a8&oe=5BF8A013).
Can I get them using Facebook graph API?

How to get pictures and videos from the posts of a page in graph api of facebook

I need to get the recent images/videos and text from the posts on a page on facebook. In the Graph API Explorer, I have the GET
https://urlOfThePageINeedRecentPostsFrom/posts?fields=picture,feed,featured_video,link&limit=5&accesstoken=myAccessToken
In the response I am getting the feeds but they are more than the limit 5, also inside the feed data, I am only getting the texts that are posted. I want the number of likes, links, pictures or videos attached to those as well.

Getting a list of facebook posts and displaying them manually

Is it possible to retrieve a list of facebook posts and display them manually, that is, not by including some external element from facebook? I'd like something like an xml or json feed, containing my posts, so that I can display them on my site however I want.
This link shows how to use Facebook's SDK to get a user's feed...and then you can do with it as you please!

Using the Facebook Graph API how can find the most liked photo in an album on one of my pages?

Using the Facebook Graph API how can find the most liked photo in an album on one of my pages?
I have access to the page insights if that can be used.
There are 200 photos in each album so I don't want to do an api request for each photo.
Subsequently you may also find the most commented on.
Here is the code you request:
http://fivespot.me/fblikes.php
$likes = $facebook->api('/'.$picId.'/likes');
However if you are looking to just find out the most liked there is an app already compiled that will do this for you:
http://apps.facebook.com/imanpic/
The Graph API doesnt support querying for an arbitrary set of photos with some criteria. BUT - you can access the Likes object for each Album, which returns a data set representing all the Liked Photos in that Album. You could then just walk that data set and count the number of times you see the same photo Like.
Thus - you just need to issue a Graph API call for Likes sub-object of an Album.
See "Likes" under "Connections" at:
http://developers.facebook.com/docs/reference/api/album/