I'm interesting using the FB API to query for which users have shared a certain URL. Shared, not liked.
So starting with something like http://cnn.com, I'd love to get the IDs or at least names of users who have shared the link.
I realize that many FB posts are private to the user's network, but some are public like on a fan page.
Reading through the documentation, I couldn't find a way to accomplish this.
Related
I am planning to use Facebook feeds from some public pages which don't belong to me. For example WHO Facebook page. I am planning to use these posts from multiple pages and show on a website. My question is, whether this is even possible with all kind of crazy security policies in place? Since Facebook is allowing to embed public posts, I am assuming we can achieve this somehow. If I have to create page/app myself and get it reviewed by Facebook, anyone got any link on how to get this done?
I have been searching via Google and found so many articles about this but now I need to ask some general questions.
I'm trying to get the likes and shares for a URl in Facebook. Please correct if I have misunderstood what a URl is in this context.
I have a URl with special content I want to promote via Facebook. I share it via a special Facebook page I built up for this articles.
Then I share this content of this page with my personal account in different groups. In every article I distribute in different groups the original URl with all its opengraph data is inside. This content is distributed by Facebook with a marker, that I (my name) shared content of a page (page name).
I have tried so many ways to get the shares and likes for this URl I posted via facebokk, but never got the correct values.
When I for example aks the "link_stat" table I get a number like 29 for likes. If I take a look a the content/URl I posted at the page 34 users liked it und the published URl in a group is liked by 59 users. Can you help me what this like from "link_stat" means?
I thought, if facebook users like and share the URl distributed via this way in one or more groups I get all likes and shares for this URl all over Facebook?
Am I wrong?
Thanks für your help!
Regards,
Jens
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.
I'm experimenting with fetching a list of public likes,
eg graph.facebook.com/[my own id]/likes
gives a list of books, authors etc that I've "liked".
But if I use the ID for someone I'm not connected to, although I can see on their public page they have a long list of "likes" that I can just go and look at, the graph API returns an empty list.
Is there something I'm missing about graph API permissions and public likes?
Thanks for any information you can give!
Is there something I'm missing about graph API permissions and public likes?
Apps are not allowed to access just any data, only because it might be “public” when viewed through facebook.com.
For most data, you’ll have to request the according permissions from the current user of your app to access it via the API.
Also, its important to point out that 'favorites' and 'likes' are two different things. The 'favorites' are the list of apps and pages on the left when you are logged into the main facebook page. Those are different than pages you've 'liked'. Just an FYI.
let us start with the known bug from facebook's own dev site:
http://forum.developers.facebook.net/viewtopic.php?id=74700
It appears this is a problem with the IDs of objects other than Posts. Posts
have object IDs of the form USERID_POSTID. When used with the /likes/ URL,
Posts can apparently be liked because their URL conforms to this format.
However, other items, such as status messages, photos, videos, etc. all conform
to the simpler ITEMID object ID. If you add the person who posted the item
(from the from field) to make it of the form USERID_ITEMID, you can also like
and unlike these other types of items.
So let us take http://www.facebook.com/CirqueduSoleil as an example, it has a person ID of 144074117500. For some wierd reason, it is a Person. So, how can I like a Person with the Social graph API.... I am definitely running into the "Whitelist Error" when I try to /144074117500/likes
So how can I "like" anything besides something in the format of userid_postid, in other very simple word: how can I simply like a person using the social graph api?
Firstly, you are not talking about "persons" (users) but facebook pages. And secondly, facebook developers can not create a application that allows to like facebook pages. You can like statuses, comments, pictures, videos, shared links via API (doing POST request on //likes), but not facebook pages. Users can like pages only with the facebook social plugins fb:like (or using the facebook website).
So, why whitelists ? I guess because Facebook can allow some privileged partners to add this feature, but that is not widely open.
You can check some other similar answers for this questions.