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

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

Related

How to get the thumbnail url for a video in an Instagram hashtag feed?

This is specifically about hashtags using the Facebook Instagram API.
Has anyone successfully retrieved the thumbnail url for a video in a hashtag feed? Even when using the graph API I cannot get anything to return?
To get the thumbnail_url you have to make an extra call to the Oembed endpoint using the post for the video and an access token. You must have an approved APP for this to work also. https://developers.facebook.com/docs/instagram/oembed/
https://graph.facebook.com/v9.0/instagram_oembed?url=https://www.instagram.com/p/CKRgKXoif40/&access_token=xxxxxx
Then you will see the thumbnail_url option available to you.

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

Modify the photo description using Facebook Graph API

I'm able to publish a photo with description on Facebook using Graph API.
But, i figured out that i can't delete it using Graph API, as of now. But, is there any way to modify the description of the existing photo?
I tried many API calls, but no success yet. Is this achievable or so far, such functionality doesn't exist?
Thank You
We can delete the photos that are uploaded via our APP. we can use the ID of photo to delete it.

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.

Can I upload photos but not post to wall in Facebook?

Can I upload photos using Facebook API but not post to wall in Facebook?
What I use is the photos.upload in the API.
If it cannot be avoided, is there any way to delete that wall post so that I don't have to do it manually?
Documentation of graph API (http://developers.facebook.com/docs/reference/api/photo/) mentions the following:
If you would like to suppress the
story that is automatically generated
in the user's feed when you publish a
photo (usually because you plan on
generating your own), you can add a
no_story=1 parameter. In this case,
the user will receive a notification
that your application has uploaded a
photo.
Adding the same parameter to the legacy REST API seems to work for me
Let me answer my own question:
It's about the permission problem. We can set the permission so that the photos do not publish to wall.