Where can I find the data points for the Insights chart in the Facebook dashboard? - facebook-graph-api

I am currently using the Open Graph API but am not opposed to using FQL if it can get me the data points I'd like. Right now I am just hitting the urls directly and not worrying about a client SDK.
Of the three charts on http://www.facebook.com/insights/ => websites I can find the data for the Site Engagement chart in the Domain Insights in the API.
However, I can't seem to find the points for Distribution on Facebook, or Referral Traffic to Site in the insight data being returned for the domain. Did I miss them, are they available maybe in FQL or are they just not exposed yet?
Edit: It looks like someone doesn't understand what charts I am talking about so to clarify, I am looking for the following anywhere in the Open Graph API, FQL, or anyplace else in Facebook:
Like Story Impressions
Share Story Impressions
Like Story Clicks
Share Story Clicks

This info is now available via the Insights app. News Feed section has some of it, at least the story impressions and clicks.

Related

How to enable behavioral marketing with cookies?

I have done some research, looking for the right answer, but nothing was specific. First of all, I saw sites on how to create a cookie, but it was not clear how it would be useful for me.
Recently, I was buying a gift for someone and went to a clothing store online. I purchased some items, no when I go to Facebook, for example, I see that clothing stores ads. I assume there was a cookie put on my computer, in my temp folder, and then Facebook knows to show that ad.
I want to do something similar, but with Google Adwords. When people go to my website, I want to add a cookie to the user's computer so that when they see Google ads, either through the Display Network or in the Search Network, my Google Ad will come up because they had already shown an interest in my product/service by coming to my site.
This is obviously possible with Facebook ads, but can I do it with Google Ads? I would like to know how to do this. Any details or step-by-step resources would be greatly appreciated.
You can do this with remarketing: https://support.google.com/adwords/answer/2453998?hl=en

Facebook opengraph insights api on specific post id from my app

I want to build a dashboard that returns more customized insights from the insights generated by app.
The app is a facebook connect website that users visit and view a list of products. They can post to facebook about that particular product by sharing a custom story that incorporates that product on their timeline.
When I go to the insights for my app, it does a great job of showing me all social impressions for all custom stories that were generated on my site.
I'd like to narrow that down even more for specific products.
My plan is to record the object ids that are generated by these actions and link them to a partucular product in my database.
I'd then like to create a new dashboard page that will allow me to login, request read_insights permission from me and then use that object_id:product mapping from my database to show how many social impressions where recorded for a given product's object_ids.
Is this possible? I've read alot about it but still haven't found the most elegant way to get a segmented report of social impressions per type of content that was posted.
Thanks for your time.
The implementation all depends on which platform you want your app to run on.
The first major component is you must have a Facebook developers account which is easy to signup for. Just go to developers.facebook.com and register. Takes like 2 mins. After that you will need to create your first app and add the correct domain name where your app will be hosted and what platform it will run on. (iOS, Android, Web, ect.) Once that is finished you can make your app public so you can use the Facebook API in your code.
For the app creation itself. The first thing you need to do is import the correct API for your platform. Which you can find a walk through at https://developers.facebook.com/docs/. Once the API is imported you must build a Facebook object which contains your app id and possibly app secret. If you're using JavaScript you don't want to use the app secret because it will be visible to the public.
Now that you have your Facebook object you must require the app users to log in and grant permission to your app. You can add extended permissions to your log in process by adding a scope value to the log in button generated by Facebook. Here is an example.
<fb:login-button id="loginBtn" max_rows="1" scope="basic_info,read_insights,manage_pages" size="medium" show_faces="false" auto_logout_link="true"></fb:login-button>
After the user is logged in you can now query information from the users account using Facebook Api calls to Social Graph. Facebook also provides a tool to help you figure out what information you can query. https://developers.facebook.com/tools/explorer
Everything else you want to do with the app can be done by Facebook API calls. You just need to insure you grant the user the correct permissions before making the API calls.
API calls are a little different depending on which language syntax you are using but they all follow the same data model and return some array of responses which can be parsed using JSON or the standard array format. The Graph Explorer tool listed above will show you the output for your queries so you can handle them accordingly.
I hope this helps gets you started.
EDITED
Here's the implementation in JavaScript
function getMetric(){
// make the API call
FB.api(
"/{app-id}/insights/application_opengraph_story_impressions",
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
);
}
Here's the reference now that Facebook docs are back up https://developers.facebook.com/docs/graph-api/reference/insights
application_opengraph_story_impressions will probably give you the total impression of all stories made by your app. I ran it against my Facebook app and it came back empty but I don't have any stories so it might work with your's. Also to note in the documentation there is an * by this metric and I could't find what that means.
I'm pretty sure that right now Facebook don't give developers ability to get insights about app custom stories.
Currently Facebook documentation has the following Graph APIs for Insights data:
/{page-id}/insights
/{app-id}/insights
/{domain-id}/insights
/{post-id}/insights (where this is a Page post)
So /{post-id}/insights won't work because custom story is actually user's post and others endpoints don't apply to your case.
As far as I know the only other option to access Insights is FQL. For that you'd use insights table in a manner similar to this:
SELECT ... FROM insights WHERE object_id = ... AND metric = ... AND end_time = ... AND period = ...
Now most likely this also won't work with your custom story posts (I don't have posts which I could try it on right now, so I can't tell) but at least it is not explicitly stated so in the documentation, so you should probably try it out.
UPDATE:
I wasn't able to get any insights data via FQL, although as far as I understand the following code should have gave me at least something (object id is for my page):
SELECT breakdown, end_time, event, metric, object_id, period, value FROM insights WHERE object_id = 224981264214413 and metric = 'page_fans' and period = period('lifetime') and end_time = 1395597892
But it results just in
{
"data": []
}
Facebook also has some pretty old bug report about similar topic: https://developers.facebook.com/x/bugs/508088155954330/ where they confirmed the issue, assigned it, and... did nothing to fix it for 6 months.
In case FQL doesn't work, my suggestion to you is - use your own analytics code to track the creation of custom stories and get the friend count of the users. It won't show you the real exposure of the posts but at least you will see some data on which types of custom stories where posted more often and what was the maximum potential friend count that could have seen them. By the way - to make charting easier, you could use Google Analytics events for that.

Insights for pages that have been liked

So I would think this would be an easy thing to do, but I'm completely lost right now. I have a website. It has a facebook page. That fb page has a bunch of likes and all is good. We also have the "like" button on various webpages throughout our website. If I go to those webpages individually, I can see how many people have hit the like button, but I have not found any where to see some reports. Ideally, I'd like to see:
The most popular (liked) webpages on our website
The total number of interactions (likes) across my domain
The same basic demographic information that is available for our fb page
We have had the like button integrated for a few months now, but I'm not sure if it should be linked to our fb page or if I have to create a custom app to associate it with. Right now we have it assigned to our fb page.
Is this possible?
It's possible, but requires a few steps:
Claim insights for your domain: http://developers.facebook.com/docs/insights/#claiming_a_domain
Grab your domain ID: http://developers.facebook.com/docs/reference/fql/domain/
Access insights using the graph API

Pulling Facebook photos onto an external website

I'm doing a job for Company A. I've just built their website in Django but now they want to add a social photo management aspect to the site (in that other people can upload).
The only way I know of doing this (having done it before) is through Flickr. You can set up a group and have it so anybody can add photos to it. And pull out the latest with RSS. But let's be honest, Facebook is far more popular and my client wants this feature heavily used by his clientèle.
They have a Facebook page and the power to open it up so anybody can add their photos to it... But how can I pull those photos back to the website?
Facebook's query language can do this (like the RSS sends data to you from Flickr) for users of FB pages, and there are some Javascripts for making them viewable and interactive on external web pages.
For example:
http://www.codeofaninja.com/2011/06/display-facebook-photos-to-your-website.html
http://www.alexanderinteractive.com/blog/2012/03/display-facebook-photos-on-your-website-with-galleria/
Good luck!
Terry
I'm not sure if this will help, but I recall that the Flock Web Browser had the capability of loading a stream of new videos/photos on the top of the brower's media stream bar - perhaps you can sneak a peek into the inner workings it uses to accomplish this task.
I know that you can start reading the RSS feed of a Facebook Page itself now, perhaps just a little parsing is all you need: http://www.allfacebook.com/facebook-pages-rss-2010-01

Facebook integration... Where to start?

I recently put a django project of mine into its beta stages and would really like to integrate more with social media, particularly facebook.
Now there are so many facebook integrations out there... I don't know where to start but, I'll tell you what I am after.
My sites publishes content with photos and also user related data (which site doesn't)
on each individual page I already have a facebook like button that basically has the absolute url of that page
so for instance:
http://my-site.com/url-1
http://my-site.com/url-345345
http://my-site.com/url-456456456
When a user likes this particular url I would like them to become a Fan on my facebook site/page as well.
I also added the FB opengraph tool which is a bit more informative once a user likes it. But it still does not publish any statistics to my page.
Can someone give me a bit of an understanding on what the best option is for this type of integration?
As a security option for the user, Facebook has never allowed third party access to "become a fan."
If you want to record locally when someone presses the "Like" button, you'll have to implement it locally (copy the presentation, and query Facebook yourself), so you can intercept the event. I've done that; it's not too hard.
I suggest you review the Connect Terms of Service to see what it is you're allowed to do: http://developers.facebook.com/policy/