Is it possible to get insights (views) from a video posted by a user (and not a page)?

I have a script which gets all users videos and displays them, however, I'm looking to get the stats with the video. So I'd like to retrieve views, likes and comments alongside the video image.

My research has shown me it's all accessable with the read_insights permissions and the /insights/ endpoint. However, this is failing and the only documentation I can find referring to this, talks about pages, not users

Is it possible to retrieve insights on a users video? if so, can you link me to the docs, (or change my example, if you prefer to look at code)

            function loadAlbums()
            {
                FB.login(function (response)
                {
                    if (response.authResponse)
                    {

        //Logged in and accepted permissions!

                        document.getElementById("status").innerHTML = "Getting album information from your Facebook profile";
                        var counter = 0;
                        // Start Normal API
                        FB.api('/me/videos', function (response)
                        {
                            var d = response.data;
  for (var i = 0, l = d.length; i < l; i++)
                            {  
                                  // Here's where I'm trying to load individual insights for each video. and then logging the response
                        FB.api('/'+response["data"][i].id+'/insights/post_video_views_organic', function (resp)
                        {
                            var de = resp.data;
                            console.log(resp)
                        });




                                addOption(response["data"][i].name, response["data"][i].id);
                                counter++;


                            }
                            document.getElementById("status").innerHTML = "There are " + counter + " albums in your Facebook profile";
                        });


                        //end of  Normal API

                        document.getElementById("albumBtn").style.visibility = "hidden";



                    }
                }, {scope: 'read_stream,read_insights,user_photos,user_videos'});


            }

Answers


I am having the same problem :) I can get only likes and comments, but not quantity likes and not quantity comments. For example: /{your-post-id}?fields=likes,comments{comment_count,like_count} https://developers.facebook.com/tools/explorer/

if I know the answer - I 'll write you

<-- My solved -->

You can't get insight views for post by a user because insight uses for page and page posts


Need Your Help

Escaping '&' character in thymeleaf

hyperlink thymeleaf

I need an image loaded onto a html img tag using thymeleaf. The problem is, the image itself is obtained from a url which takes in two parameters.

What is inferred latch and how it is created when it is missing else statement in if condition.can anybody explain briefly?

verilog

I tried to figure out the inferred latch and why it is needed internally, but I couldn't find any resources with enough detail.