I would like to get number of impressions for someone else's (not mine) facebook page. Is it possible via graph or FQL api or any other means without having administrative access to the page?
No. From the insights api documentation -
Without a session, an application can retrieve only its own metrics. With a user session, it is possible to retrieve data for all applications, pages, and domains owned by the session user. Reading this data requires the read_insights permission.
Facebook API link - http://developers.facebook.com/docs/reference/api/insights/
Related
I would like to get all the posts and updates that are normally displayed in FB official application for MY account (this includes updates from my friends and liked pages).
I wasn't able to find any details how to get that, the only thing I've managed to get is my own posts.
Anyone got any experience with that using current Graph API verion (3.3)?
All the alternate FB clients (ex. Friendly) must be doing this somehow.
There is no way to get ANY data of users who did not authorized your App. Which means, there is no way to get posts of friends. You can only get your own friends, with the user_posts permission and the /me/posts endpoint. If some Apps access friend data without their authorization, they are most likely doing something that is not allowed.
Here is what I found in their API docs:
There are two scopes:
The user feed requires the user's permission
The public feed has fewer capabilities but doesn't require perms
Facebook recently introduced Instagram Graph API, which allows to fetch data from Instagram page that is connected to your Facebook company page, instagram.com/developers states:
The Instagram Graph API is Now Available to All Developers.
For Non-Business Instagram Accounts please continue to use the existing Instagram API.
So, for example, if my company has account instagram.com/my_first_company, I can only retrieve its feed and no one else.
Using old Instagram API to retrieve public_content permission (access to any feed) is no longer an option too, from old API documetation:
public_content - to read any public profile info and media on a user’s
behalf (applications no longer accepted)
What will happen to existing tools that have public_content permission? (for example, there are tons of plugins for various CMS that allow to display recent Instagram photos)
Is there any valid way to access public_content (access to any feed) right now (besides fetching HTML pages of Instagram website)?
Are there any plans to enable Graph API for non-business customers, of so when?
UPD. There seem to be ?__a=1 endpoint that allows to get access to recent photos of any public feed without any tokens. But it's not official and no one knows when/if Instagram will close it. If you do - please let me know.
UPD 2. Instagram removed ?__a=1 endpoint, not sure for how long, probably forever. Currently the only way to access instagram feed is to scrap instagram.com website, which is a horror.
Prerequisite: You first need the business Instagram account to be linked with FB Page. https://help.instagram.com/356902681064399 - That one can do from the profile page of Instagram account.
Get the Instagram business account id:
graph.facebook.com/v2.8/<fbPageId>?fields=instagram_business_account. (the fbPageId is the page id of the facebook page the account is linked)
To fetch instagram media feed: graph.facebook.com/v2.8/<igBusinessId>/media to fetch the media feed of the Instagram account. (the igBusinessId is the id returned in above linked instagram_business_account) - This is still owned media as per the page access_token. Not any other user's feed.
All other endpoints (such as comments moderation, detailed insights API) mentioned here works on the business media list returned on above call.
Please note:
This still does not allow to fetch un-authenticated user's Instagram feed. That is not possible via API now. There is no valid way via API to get to public_content scope. There can be few Instagram Marketing partners for which this is enabled. But, in general the scope is deprecated now!
Currently, for FB graph API to work we need linked business page to Instagram account. As above apis uses page tokens.
You can get information about any IG business account using your FB access_token using the business_discovery API as given here.
You must have an IG business account to read other users data like user_info or media details using the id of your IG business account as a node.
Ex:
GET graph.facebook.com/[YOUR-IG-BUSINESS-ACCOUNT-ID]?fields=business_discovery.username(USERNAME){media{caption,media_url,media_type,like_count,comments_count,id}}
I would like to fetch the users list from Facebook Graph API 2.0 who has checked in at particular place or a page. I tried to use this way:
https://developers.facebook.com/docs/graph-api/reference/v2.0/page
But it does not provide that information. Can this be a privacy issue?
Is there a way that if I am a page admin of the place, where people check in, I can fetch the user ids of those users?
Any kind of help or guidance will be very appreciated.
Regards
This is not possible IMHO, because the user's checkins are bound to the OAuth access restrictions, meaning that every user need to give your app the permission to request his data.
As you already refrences, the Page itself has no edge for the checkins: https://developers.facebook.com/docs/graph-api/reference/v2.0/page#edges
Using the normal Facebook website, one can get to a page showing which pages a user has 'liked'.
From the graph API, it is possible to get this for pretty much all pages, using graph.facebook.com/userid/likes?access_token=MYACCESSTOKEN.
However, I need to be able to do the same - i.e. get the list of pages a user has 'liked' for normal Facebook users (and not 'pages' who have 'liked' other pages).
Is this possible with the single access token? Judging by the fact you can get this info from the normal Facebook web page, I would expect it to be possible.
Privacy works slightly differently for applications accessing the API and for users accessing the actual site.
An application doesn't have access (by default) to your friends' likes to prevent data mining. In order to get a users friend's likes, you'll need to request the friends_likes permission.
You can read about this permission and others in the documentation.
We run some facebook pages for our clients and we'd like to run off some reports, like many people LIKED those pages yesterday, for example.
I can see that this can be done by FQL, but you need an access_token to run the queries using Facebook Graph API in (C#).
For these Facebook pages there isn't an app associated with them, so without app_id how can I get authenticated to be able to run those queries ?
Thanks
You could create an app that you then use to retrieve the stats.
If you then get an access token for a user that is an admin of the pages and request the read_insight extended permission you can get the insights data for each page, which will give you plenty of stats to report in a handy JSON format.
See here for more details on the insights in the graph API
http://developers.facebook.com/docs/reference/api/insights/