mfsymb
mfsymb

Reputation: 453

Facebook API Video Views

I want to get the views of a video on my Facebook page.

My request:

{object-id}/insights/post_video_views_organic

But instead of data I get the following error back:

{
  "error": {
    "message": "(#100) Tried accessing nonexisting field (insights) on node type (Video)", 
    "type": "OAuthException", 
    "code": 100
  }
}

I haven´t really worked with the Facebook API in the past so I cant really translate this error message. (I am using the Graph API Explorer)

Upvotes: 12

Views: 6195

Answers (2)

alexoakley1
alexoakley1

Reputation: 565

Try adding the id of your facebook page (which you can retrieve through the Graph API or here) to the start of the object id, followed by an underscore ('_') then the object id of the video.

Upvotes: 20

Pavan Kumar Reddy
Pavan Kumar Reddy

Reputation: 1

Instead of "{object-id}/insights/post_video_views_organic".

Use "{post-id}/insights/post_video_views_organic" . You will get the metrics.

The "post-id" is post id of that video post.

Upvotes: -1

Related Questions