Facebook Graph API Video Insights - facebook-graph-api

I have a video id that I am grabbing metrics for, but I can't seem to get the metrics in the image below. Link clicks does not seem to be a metric I can find, though it shows up in my creator studio associated with the video post. This is my current call being used. If I remove most of the insights to just get all I don't even see a metric aligned with the clicks number I am looking for.
https://www.facebook.com/video.php?v={USING THIS VIDEO ID}
{videoID}/video_insights?metric=total_video_impressions_organic_unique,total_video_impressions_paid_unique,total_video_impressions_unique,total_video_stories_by_action_type,total_video_views,total_video_impressions
Image: click metrics

Related

Log Based metrics preview displays but absent in metrics explorer

I have created some log based metrics in GCP and confirmed using the Preview Logs that they are valid (getting green bubbles with numbers in them).
However, when trying to view these in the metrics explorer, they are inactive (I need to toggle "Show only active resources and metrics" for the log based metric to show up) -- and then after toggling it on, sure enough, there is no time series to display.
What could be the problem?
Not sure if you got this sorted, but it's a top result when I was working through this.
In my case I was using string values in a distribution type log based metric. So it looks fine in the Preview Logs, and the labels all look fine, but when you send data through you get nothing in metrics explorer.
Creating a new counter type metric worked fine.

Showing Data Viz (i.e. D3.JS,etc.) on Actions on Google

Is there a way to output a chart or other data visualizations in Actions on Google?
example:
User: "What is the percentage of sales this december?"
Actions: outputs a chart generated using d3js or other data viz tools
The only workaround that I can think of is by saving the chart as images then use that image to show in basic card. but the image is too small, it's not visually pleasing to use in other devices i.e. Google Home Hub.
The way to do that is generate an image and send it as a basic card. There's not another way to visually show information.

AWS Pinpoint: How to view custom metrics

It is clear from the documentation that I can add custom metrics for a custom event.
How do I view these metrics in the Pinpoint console? From the Pinpoint console, it is obvious how to view attributes. I can go to Analytics > Events, select my custom event, and narrow down the events to whatever attributes I desire. I am asking about how to view metrics. To be clear, these differ by being continuous values whereas attributes are discrete. The documentation says that I can do this. See below how I can filter by attributes manually: (attribute is circled)
See the docs on custom events here: https://docs.aws.amazon.com/pinpoint/latest/developerguide/integrate-events.html
Similarly, creating a funnel only allows filtering for attributes. How can I filter for metrics?
Thank you for your time!
When I first asked this question, AWS had the ability to record metrics with the Swift SDK, but not view them in the Pinpoint API, which is absurd, because then you can only record metrics. What's the point? I asked in the AWS forums, and a couple months later, they responded something along the lines of "Please wait - coming soon."
This feature is now available, whereas before it simply wasn't.
Go to Pinpoint, your project, then click the Analytics drop-down menu, then click events. You can see that you can sort by metric. If you look at my outdated screenshot above, you'll see that this was not an option.

Get posts from all my Facebook Pages?

I want to get the most recent updates from my liked Facebook pages (graph.facebook.com/me/likes/). I thought I'd got it working using FQL with the below statement
SELECT source_id, share_count,likes, FROM stream WHERE source_id in (select target_id from connection where source_id=me() and target_type='page') LIMIT 100
However it seems that FB is filtering out a bunch of pages due to their various algorithms. Is there any straight forward way of getting around this? I'd just like to see all messages and decide whats relevant myself.
I was previously jumping onto every single page of my likes via the graph api, but obviously this gets a bit crazy if there are 700 odd likes in my profile.

How do I speed up /me/home requests?

I have an application where I want to show items that your friends have shared. This is basically a subset of data that would appear on your Facebook News Feed, so I am grabbing /me/home and then filtering out some things that I don't need.
The problem is that /me/home is extremely slow. I'm seeing a range of response times that is between 1200 and 10000 milliseconds with an average probably around 4 seconds.
Even with cached connections and a HTTP library that does SSL correctly these request times do not change much.
Does anyone know a better way to grab the News Feed? When I open Facebook in my browser, the News Feed appears pretty much immediately. So I am wondering if there is some Graph API call that is optimized for this data or has this result cached already.
Is there maybe an FQL alternative for this?
You can do this in FQL. This query should get you started:
SELECT post_id, actor_id, target_id, message, attachment FROM stream WHERE filter_key = 'others'
In the Graph API explorer on my feed, I get ~1000ms response times for the FQL query vs. ~2500ms for me/home.
For Facebook's home page, keep in mind that they use a series of AJAX queries to fill each of the boxes on your page a little at a time. I was on a very slow connection in a hotel last week and watched these fill box by box. The news feed fills first, five posts at a time, followed by the other boxes on the page. If page load performance could be an issue, you may want to move to an asynchronous model.
FQL will definitely help with that, as you'll be able to filter the data before it is returned by FB more finely than you can with just the Graph API.