Fetching all videos from facebook user news feed page and storing it in database [duplicate] - facebook

I am using rails and I need to fetch all user videos and user friend's videos from facebook and store it in our database.
Video's which is like
User and user friend's liked videos,
User and user friend's shared videos,
User and user friend's tagged videos,
User and user friend's commented videos,
User and user friend's uploaded videos, etc
So Is there any easy method to retrive all these videos at same time?

Videos in the user's stream will be in the stream object (see https://developers.facebook.com/docs/reference/fql/stream/). Play around in the Graph API explorer using fql?q={your query here} to see the results. You can play around with the where clause to get various groupings back. However, from my experience, to get all 5 categories of videos, you will have to run multiple queries. See documentation on multiquery query (Good examples here on this old REST API documentation: https://developers.facebook.com/docs/reference/rest/fql.multiquery/) Some of the non deprecated APIs support this.
Remember the Graph API explorer is your friend.

Related

Facebook Graph API: How can I retrieve the number of views of a video I shared from another profile using the Facebook Graph API?

I have a business manager account for my Facebook profile and I re-shared a video from another profile. How can I retrieve the number of views that my re-share accounted for through the Facebook Graph API?
If the video were posted directly to my profile rather than re-shared, I'd be able to use the /v2.8/{video-id}/video_insights method to retrieve the video stats, but that does not appear to be available for re-shares. The only insights that I can find for re-shares appears to be /v2.8/{post-id}/insights, but that does not include video views.
For example, here is a Facebook post by The Dodo where they are re-sharing a video by Discovery News.
This information can be retrieved by making a call to /v2.8/{post-id}/insights/post_video_views

How to get videos uploaded by user using Facebook Graph API?

I'm developing an application to show videos and images from facebook by using the Graph API. I've followed the Graph API document and able to show all images. But in the case of videos I'm getting only the videos where the user is tagged-in.
I need to get the user uploaded videos too.
How can I get the videos?
The Graph explorer link : https://developers.facebook.com/tools/explorer/APP_ID/?method=GET&path=me%2Fvideos&version=v2.3&
After some changes in the Graph API calls I've found the solution.
https://developers.facebook.com/tools/explorer?method=GET&path=USER_ID%2Fvideos%2Fuploaded&version=v2.3&
This'll help us to get all the uploaded videos.Where USER_ID is the id of the user who's signed in.
/me/videos should return all videos, tagged and uploaded. You can restrict to one or the other by using the type parameter: /me/videos?type=uploaded

Get all photos, videos of Tumblr

In tumblr.com, are there any API to collect media data such as photos, videos of an account?
Like Facebook, there are Photo , Album feature which allow user to get photos.
Thanks in advance.
Tumblr is blog-based.
So, you can't post a photo or video like Facebook.
Therefore, you can not retrieve photos, videos via Tumblr developer site http://www.tumblr.com/developers
I think there is only way to do this job is you can get all posts of a blog, then detect whether there type are photo/video. Then, extract photos/videos from posts.

use graph api on php to get video data from facebook page

I need load all videos data from a facebook page use graph api. How do this in php code?
You will have to use Facebook FQL for Querying Video Table. Hope it helps
Edited
To read video you need:
Any valid access_token for publicly available videos
user_videos permissions for all videos owned by the user (including nonpublic videos)
friend_videos permissions for videos owned by the user's friends
See this example for more detail for getting Valid Access Token

Fetching all user and user friend's videos from facebook and store it Database

I am using rails and I need to fetch all user videos and user friend's videos from facebook and store it in our database.
Video's which is like
User and user friend's liked videos,
User and user friend's shared videos,
User and user friend's tagged videos,
User and user friend's commented videos,
User and user friend's uploaded videos, etc
So Is there any easy method to retrive all these videos at same time?
Videos in the user's stream will be in the stream object (see https://developers.facebook.com/docs/reference/fql/stream/). Play around in the Graph API explorer using fql?q={your query here} to see the results. You can play around with the where clause to get various groupings back. However, from my experience, to get all 5 categories of videos, you will have to run multiple queries. See documentation on multiquery query (Good examples here on this old REST API documentation: https://developers.facebook.com/docs/reference/rest/fql.multiquery/) Some of the non deprecated APIs support this.
Remember the Graph API explorer is your friend.