How to get FB Graph API Business Rating - facebook

I have recently started using Facebook's Graph API. I was wondering is there a way I can get just the overall rating of a business that I am not the owner of the page of. I am aware that there is a ratings edge that allows you to pull all reviews if you have a page-access token but I do not have this and do not need that detailed information. I do not see any fields in the "page" documentation and do not want to resort to scraping. This will be used in an app to compare businesses.

It is not possible to get ratings/reviews of a Page you don´t own. As you found out yourself, you do need a Page Token, and you don´t get one if your user does not belong to any Page role. There is no way to get the ratings/review in that case, and scraping is not allowed: https://www.facebook.com/apps/site_scraping_tos_terms.php

Related

Instagram Graph API getting users geolocation without login and access token

I know that you want to suggest me private api or any scraper. I used them but they don`t return accounts geolocation. In my application I want to get instagram accounts geolocation, likes, comments, followers and follows in order to get engagement of account.
If you say it is not possible look TrendHero website it returns all information about users, followers rank, country information and other handy information which you can find in your insights (in instagram account) without users permissions.
My first impression, without caring to dive deep into the company you linked, is they are simply using scrapers. That's typically how those big contact databases are done.
The Instagram APIs simply don't provide the access they used to. That's how it is. Simply asserting there must be a way doesn't mean there actually is.
#WizKid Instagram can't actually prevent scraping. They just make a little fuss about it.

Can I access a Facebook Page with the Graph API without creating an app?

In the past, I think a Facebook Page access token could be generated manually, and then used with the graph API to query posts, comments, likes, shares, etc. Now it seems you cannot query anything without developing an app that I login to and then in turn the app generates the access token. Is that true? For example, this question from 2015 claims no access token is needed for public data, but when I try their example it returns "An access token is required to request this resource."
I'm the admin of my page that ran a basic contest (giveaway). I'd like to use the graph API to fetch the names of people that liked, shared, or commented on a post. Then I want to cross reference it with those that like the page. Do I have to register and develop an app for this? Does my page have an access token available without going through the app registration and review process?
Can I access a Facebook Page with the Graph API without creating an app?
No, that is not possible. You always have to use an App for any API Access.
Then I want to cross reference it with those that like the page.
That is not possible either, not even with an App. I assume you want to make sure that participants like your Page - which is not allowed. People cannot be "incentivized" to like your Page.
Platform Policy: https://developers.facebook.com/policy/
Explanation about the specific rule against requiring people to like your Page: https://developers.facebook.com/docs/apps/examples-platform-policy-4.5

How to get insights on a Facebook fan page without user login

I'm trying to figure out how to get the total number of comments, posts, likes and fans for any given Facebook fan page and date range using the Facebook API's. I need to be able to do this without the user having to log into Facebook to give the app permissions. This does seem to be possible, as this site is able to do it https://app.conversocial.com/profiler/ .But I don't know how they are doing it.
I've looked into the 'insights' fql table, but this always seems to return empty results. And I've also looked into the 'link_stats' fql table but this doesn't allow a date range to be set.
Does anyone have any idea on how to do this?
You are right. What they are doing is not possible by using the normal Graph API or/and the FQL.
However, Facebook also provides support for two other APIs:
Public Feed API
Keyword Insights API
Access to these APIs is restricted to a limited set of media publishers and usage requires prior approval by Facebook.
I think that they are using the Public Feed API. The documentation of the Public Feed API lists some of the publishers that have been using this API and the site you've mentioned in the question is not in the list. The documentation also doesn't mention anything about getting the Page Insights, but I think it might support this feature (as I see no other way of doing it).
Or, they might be using any other such restricted API which is not yet available to the public and not even documented on the developers website, but is currently in beta/testing phase.
To get the number of fans and the talkabout count, just query the appropriate Open graph ID for the relevant page. For example, for Coca Cola (https://www.facebook.com/cocacola) this is done via
https://graph.facebook.com/40796308305
To get all public infos (Posts etc) use the following request
https://graph.facebook.com/40796308305/feed?access_token={ACCESS_TOKEN}
where {ACCESS_TOKEN} can either be an App Access Token or a personal one. Consider that you can only see public entries.
The ability to query the date ranges is not provided via Facebook ad far as I know. I guess the https://app.conversocial.com/profiler/ application queries each page that is in its index once a day, and saves the results. That's how they're able to provide historical data.
You can try with the following FQL queries or graph API requests for facebook pages,
Graph API
http://graph.facebook.com/nb4cinema
FQL
SELECT name,about,description, fan_count,talking_about_count FROM page WHERE username= 'stackoverflowpage'
In case of FQL tables:
To read the page table you need
no access_token to get public information, or information about public pages that are not demographically restricted.
any valid access_token to get all information about a page that the current session user is able to see.
We have a test fan page. This has poor figures (<10 fans). Statistics are not available due to the lack of fans and likes on that page.
Allthough, conversocial spits out some statistics. They mixed fans and likes to some extent and so my impression is, that they simply parse the page code in order to get what you see.

Facebook - public posts not appearing in Graph?

I am currently trying to get the posts for a specific user from Facebook's Graph API. I have done this numerous times before using a php script I have developed; but the problem this time seems to be on Facebook's end, not mine.
I am trying to get the posts from (replacing TOKEN with an access token):
https://graph.facebook.com/100001558773450/feed?access_token=TOKEN
The graph won't show any posts by the owner of that page but will show everyone else's posts, and as far as I can see the posts are marked as public, and there are no privacy settings set on the account that would stop it from adding the posts to the graph.
Any ideas?
Thanks,
Nick
Check that you have requested the manage_pages permission to give you full access to the page (if you need access as the "page owner").
Using the access_token you've got, according to this documentation there are three different things that you can select feed, statuses and posts.
I'd give those three a go from https://graph.facebook.com and if what you get back is what you require.
https://graph.facebook.com/100001558773450/feed?access_token=...
https://graph.facebook.com/100001558773450/statuses?access_token=...
https://graph.facebook.com/100001558773450/posts?access_token=...
You need to check the "profile" privacy settings (what to share with apps). But most importantly, this is against Facebook ToS!
You can't use a user profile to represent your business, you need to use Facebook pages instead!
More can found here:
Why should I convert my profile (timeline) to a Page?
Since profiles
(timelines) are for meant individual people, they aren't suited to
meet your business needs. Pages offer more robust features for
organizations, businesses, brands, and public figures, which you can
learn more about here.
Further, maintaining a profile (timeline) for anything other than an
individual person is a violation of Facebook's Statement of Rights and
Responsibilities. If you don’t convert your profile (timeline) to a
Page, you risk permanently losing access to the profile (timeline) and
all of your content.

How can i show the wall (feed) of my page to app on facebook?

How can i show the wall (feed) of my page to app on facebook? As i see in the page
www.facebook.com/kesha?sk=app_178091127385 and
www.facebook.com/pages/Khanduna-Yengu-Nangsu-Amuktang/187317137978077
I want show the wall(feed) of my page to my app of facebook. Please Help me.
I also try and see graph api as below
graph.facebook.com//feed
But Fail,
Please Help any one.
As I understand your question, you want to take the wall of your page and show the content of that on another page controlled by an app you have made, so that is the question I will answer.
There are a couple of things you need to do.
Facebook now requires you to have an access_token to get that information. You can get this in two different ways. Either you get your users permission to grab an access_token for them, or you create an access_token for one of the admin users with offline_access and manage_pages permissions.
There are problems with both cases:
1: Getting an access_token per user requires people to give permissions to your app which is quite annoying if they just gain access to the contents of the feed.
2: Having one access_token is also a problem seeing as Facebook puts a limit on how many requests you can make per access_token in a given time.
You need to balance these things out if you want the feed to be shown. Which case would you most likely use? If you don't have many users the second case might be the best, but if you go over the request limit no content will be shown and that could confuse your users.
Anyways.. Once you are past the access_token problem, you can access the information by getting the content from the page:
https://graph.facebook.com/YOUR_PAGE_ID/feed?access_token=YOUR_ACCESS_TOKEN.
You then get a nice json output you can use. If you are using the Javascript API you can simply use the information here:
http://developers.facebook.com/docs/reference/javascript/FB.api/
If you are ever unsure how to get the information you need there is a nice tool for that developed by Facebook called Graph API Explorer which you can find here:
http://developers.facebook.com/tools/explorer/