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

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

Related

Post message with many pictures and videos to facebook page/feed using graph api

I want to publish on a page photos and videos and text in the same post.
According to the Facebook Graph API documentation v13 with this endpoint you can publish a photo on a page.
https://graph.facebook.com/{page-id}/photos
And with this videos are published
https://graph-video.facebook.com/v13.0/{page-id}/videos
Both endpoints allow a message along with the video or photo.
I suppose there must be a way to create a container like it is done on Instagram to post several with a text

Can I access the post reach or video views of a media that is posted to aFacebook wall and not a Facebook page?

I have to fetch the count of post reached and video views of media(image, video or text) that is posted to the Facebook wall of a user.
I am using Facebook Graph API for this purpose.
On doing some research I found that facebook insights are used to fetch the posts reached and video views count. But this data can only be fetched if the media is posted to a page and not to a user's Facebook wall. I have gone through the link below to confirm this
https://developers.facebook.com/docs/graph-api/reference/v2.3/insights
I even found a link wher we can get the insights of an app using the app_insights feature of Facebook as mentioned in the link:
App Insights /{app-id}/app_insights
Can I fetch the post reached and video view counts of a specific media that is posted to a user's FB account using the app-id/app_insights?
If not, is there any way to access the data for a post made in the Fb wall using Facebook Graph API?
Please suggest!!
There is no 'user insights' or equivalent feature in the API
There's Page Insights (via the /insights edge of a page or page post) or App Analytics via the app_insights edge on an App

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

How to use Facebook Photos in an iPhone App?

I have a client who wants to use their Facebook photos in an iPhone app. We want to embed their account into the app so that when people download the app, they see the client's Facebook photos. The user should not need to login or connect to Facebook.
This is different than the standard "connect to facebook so we can access you data" - we have no need to access the users data.
Do I need to create a Facebook App, connect the client's Facebook account to the Facebook app, then use that to get the photo data ?
Ok, here is what I found
My business page is http://www.facebook.com/pages/Feltpad-Web-Mobile/128861547181352
That number at the end (128861547181352) is the business' "Facebook Graph ID"
Then use the Business Graph ID and go to http://graph.facebook.com/128861547181352/albums and you will see a list of all of the Photo Albums associated with the business' page. There is only one album, so that is all the info you get. The first valuable line on that page says "id": "133208113413362" - this is the Facebook Graph ID for the album.
Then use the Album's Graph ID and go to http://graph.facebook.com/133208113413362/photos - this will give you a JSON file with all the data you need for all the photos in the album.
You can also use ?limit=25 and ?offset=50 or both ?limit=25&offset=50 to page through the results.
This should be easy. Facebook gives a public URL for albums that are public to be viewed by the Internet without necessity of logging in. You can see this URL al the bottom of the album page that you may want to share.
It looks like this:
Share this album with anyone by sending them this public link:
http://www.facebook.com/album.php?aid=[ALBUM_ID]&id=[USER_ID]&l=[SOME_PARAM]
(quoted from a public album)
you can easily leach data and extract images from there.
However it is more sane to create a Facebook app (takes hardy a minute) and use Facebook graph-API to make REST calls to retrieve all the data about albums and photos within them in well formatted JSON that will be far easier to handle the HTML. Once you have Facebook App in place, you may use it to fetch all the FB data but it violates both of your requirements (1)Not using Facebook app, and (2) user don't have to sign-in.
But it may worth looking at
http://developers.facebook.com/docs/api
http://developers.facebook.com/docs/reference/api/album
Well, there is some trick. If you go to the API page(http://developers.facebook.com/docs/api). Copy the URL given for Coca-Cola album (https://graph.facebook.com/99394368305) and make a request with photos REST command like https://graph.facebook.com/99394368305/photos you can access all the details of all the photos in the album in JSON format. I could not get it work for my personal public album though.

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.