Facebook Analytics page views - facebook-graph-api

When I load my web page, I am logging an app view event using the Facebook SDK as such:
window.FB.AppEvents.logPageView()
If I have the URL of the page from which I logged that page view. How do I programmatically get the page view count for that particular URL/page? Is there a Graph API request I can make or maybe some method on the Facebook Web SDK I can use to get such data?

There's no Graph API to retrieve this data, you can use the Facebook Analytics UI at facebook.com/analytics

Related

Facebook's Graph API posts are not visible?

I want to publish posts on a page using Facebook API. I’m an admin of the page.
I’ve done these steps:
Created an app in dev mode
Received page access token
Made a post using Facebook Graph API
A post appeared on the page. But unfortunately no one sees it. Only me.
What am I missing? Is it because the app in dev mode? If yes, is there any way to post on a page without app review?

how can i get data insights from pages facebook without have role admin or analyst in this page with graph api?

I need to get data insights from pages facebook without have role admin or analyst in this page with graph api, just with application registration.
Before your app can make calls to read, update, or post to Pages you need to get a page access token. With this token you can view Page settings, make updates to page information and manage a Page.
Graph API Doc : https://developers.facebook.com/docs/pages/access-tokens

Embedded Facebook feed on website not possible after Graph Api 2.5?

I've been coding a website using and modifying Bootstrap template. End of summer I left the site as it was, but once returning there recently I noticed the Facebook activity feed (newests posts and such) had dissappeared from my front page. Reading from Facebook Developers; after the release of Graph Api 2.5 adding Facebook feed on your website is no longer possible? Is there any other way to get the Facebook feed back on the site? I had been using iframe on my site while it was still working.
There are two main steps involved in embedding Facebook page feed in your website- 1. Getting Facebook Access Token, 2. Calling the Graph API passing the access token.
1. Getting the access token - Here is the step by step process to get the access token for your Facebook page. - Embed Facebook page feed on my website. As per this you need to create an app in Facebook developers page which would give you an App Id and an App Secret. Use these two and get the Access Token.
2. Calling the Graph API - This would be pretty simple once you get the access token. You just need to form a URL to Graph API with all the fields/properties you want to retrieve and make a GET request to this URL. Here is one example on how to do it in asp.net MVC. Embedding facebook feeds using asp.net mvc. This should be pretty similar in any other technology as it would be just a HTTP GET request.
Sample FQL Query: https://graph.facebook.com/FBPageName/posts?fields=full_picture,picture,link,message,created_time&limit=5&access_token=YOUR_ACCESS_TOKEN_HERE

Share large photo from FB album

I'm creating a web app where I'd like to 1) upload a photo to an app-specific album on Facebook and then 2) share that photo as a LARGE item/image (not a thumbnail) on the users' Timeline. I know this is doable via User Generated Photo optional parameter but is there any other way to accomplish this for a web app?
There is nothing stopping web apps from publishing Open Graph actions with User Generated Photos. It's a simple process:
Setup Facebook auth on your site, your simplest option being to use the Javascript SDK with getLoginStatus. Make sure to request publish_actions permission from users.
Create an Open Graph action and your OG object types
When the user takes the appropriate action, make an API call of the following form (signed with the user access token and POST'd):
https://graph.facebook.com/me/YOUR_APP_NAMESPACE:YOUR_APP_ACTION?
YOUR_OBJECT_TYPE=YOUR_OBJECT_URL&
image[0][url]=YOUR_PHOTO_URL&
image[0][user_generated]=true
Step 1 is the hardest part and you'd have to do that anyway if you weren't going down the Open Graph actions route.
As an example, Instagram use took as their action and a photo as their object. Their objects URLs are simply the individual photo pages on the Instagram website. So their API POST call would look like this:
https://graph.facebook.com/me/instagram:took?
photo=http://instagram.com/p/ABCD1234/&
image[0][url]=http://distilleryimage.instagram.com/somerandomstring.jpg&
image[0][user_generated]=true
As mentioned in the User Generated Photos documentation this will show up as a large, full-width photo on the users Timeline and feed.
The simplest way to perform all these API calls from a web app is to use the Javascript SDK and the FB.api function. You won't need to use any server-side code at all in that case!
Just fill this code on your photo caption
"took a ##[0:[124024574287414:1:photo]] with #[124024574287414:0]"
(without double quote symbol)
It clickable to instagram website, It's my own custom code, I made it for a week :(

How to use open graph in facebook APP page

I have a facebook app, in which I am opening my website's pages. I want to use open graph in this app. what I mean is this:
user can see all pages and can post as a open graph. When any user's click on ticker link on facebook, it should open into my facebook app. (similar like social reader app).
Please tell me is it possible?
Use fandjango to deal with the authentication for your canvas app and then use facepy (by the same developer) for interacting with the Graph API
Use Fandjango for authentication and facepy for graph api.