Fetching all user and user friend's videos from facebook and store it Database - 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

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.

Getting friend's wall post data via facebook API

I have never used facebook API.As part of my research project, I need to get activity data (the posts made, the links shared etc.) of a user's friends. Is it possible to get this data via facebook API? Do i need permission from user only or i need permission from user's friends too for accessing that data? I am assuming that since a user can see wall posts of his friends when he visits his friend's facebook profile, the same thing is possible using the API too.

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 videos from facebook user news feed page and storing it in database [duplicate]

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.