Most liked pages on a domain using graph API - facebook-graph-api

In the insights section on facebook, it's possible to have statistics of the most liked pages on the domain I own.
The question is, is it possible to obtain this list (on a website, not facebook pages) with the graph API, or at least, is it possible to obtain statistics which combines page url and likes count on a given domain ?
I read most of the facebook api doc and it seems that nothing like that exists.
Thanks!

Related

How to get all the posts that a page is tagged in using Graph API

Since FQL is deprecated from 2.1 onwards.Is there any way to get all the posts that a page is tagged in using Graph API.
tried {page_id}/tagged but it shows only the page's posts not the posts that a page was tagged.
I want to query the posts using graph API by a user on their own wall that tags the page.is there any way to do that?
isn't this a functionality of the Public Feed API which Accessing it is restricted to a limited set of media publishers and usage requires prior approval by Facebook. Applications to the API are not open at this time.

how to share page post using facebook api

There is very good and simple answer for question "how to hide page post using facebook api". Thanks a lot.
Question "i want to share friend's post via graph api" still has no answer. How come?! :)
Does anybody know how to share Post (via Graph API) from some Page (on any possible destinations: Your timeline, friends timeline, in a group …)?! Any reference to Facebook documentation will be highly appreciated.
Thanks to Maria Lucinda da Fonseca: https://groups.google.com/forum/#!topic/restfb/a94wO_KyZUM
String _destination = "me/feed"; // or "Page_id/feed"
String _linkToPost = ...;// here should be FQL stream.permalink see link to FB doc below
FacebookType publishMessageResponse =
facebookClient.publish(_destination, FacebookType.class,
Parameter.with("message", "Your message is here"),Parameter.with("link", _linkToPost ));
Also, you can share a LINK by exactly the same way: just change _destination to "me/links" or "page_id/links" and replace _linkToPost with real URL from browser or FQL link.url
FQL STREAM object
FQL LINK object
Graph api sharedposts edge
according to the above link "You cannot publish shares of an object using the Graph API."
When you attempt to use the answer provided in Maria Lucinda da Fonseca's post, Facebook graph api responds with a user error message of
"error_user_msg": "One or more of the given URLs is not allowed by the Stream post URL security app setting. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains. Read https://developers.facebook.com/docs/facebook-login/security/ to learn more about app settings related to security."
While it is possible to share links using the graph api, sharing facebook links is not allowed.

How to get general data from facebook graph api

I'm looking into the facebook graph api. I understand that I can retrieve information about a facebook web page by making a get with the current id. It's also clear that after retrieving a access token I can post on the logged in users wall and do other operations.
But what if I want more general data? Can I, for example, get how many swedish user who have used the word "Obama" in their status update the last week?
I don't think that the current search API can be that specific. You can find everything about the search API in this document.

Is there a way to track our website activity from our Facebook fans clicking link on our page?

We just started an advertisement with Facebook and are curious if there is a way to track who has visited our website by clicking our website link on our Facebook page? I am very pleased with all of the ways to track the performance of our ad on Facebook and want to see if people are not only 'liking' our page, but visiting our website to learn more about us. Any information would be helpful :)
This is our website if you need to look into it further:
http://drkennethlevine.webs.com/
I don't know how much you can change about your website or how it is built. However there is a way to track where the users who visited your page from. Use the http reffer field.
In php (and probably in most other languages) you can get the refer link by using
$_SERVER['HTTP_REFERER'];
The refer field contains the last page visited by the user.
Simply count the number of users that are surfing from your facebook page to your website.
You can use $_SERVER['HTTP_REFERER']; as mentioned by #fake, or simply use Google Analytics, which will provide you a lot of statistics for free, including referers, stats by browsers, countries...
All you have to do is create a GA account, and link your website to your account (you'll have a few javascript lines to add in your footer for it)

How to get the posts counts and comments counts from a Facebook page without Authentication

I want to get the number of comments and posts on a facebook fan page by a cron job. Are there any possible ways to do this other than scraping the content?
You have to use an app and be authorised to do that. You aren't allowed to scrape facebook pages (see https://www.facebook.com/terms.php point 3)