How to get Likes Count with one graphi api call /home with all default fields for each post - facebook

The solution at https://stackoverflow.com/a/18351526/465974
makes use of fields keyword
Is there a way to get the the likes count via likes.summary(true) or some other way with graphi api call /me/home
but without restricting it to fields
seen in https://stackoverflow.com/a/18351526/337227 solution ?

It's not possible by design as fields need to be specified for summary info as mentioned in comments to the question above

Related

(#371) Some subcategories don't represent a place

I'm getting this error when sending some place_topics on an update request to the Facebook Graph API for a given Facebook Location Page.
{"error"=>{"message"=>"(#371) Some subcategories don't represent a place.", "type"=>"OAuthException", "code"=>371, "error_subcode"=>1721087, "fbtrace_id"=>"CIewiBZL+jf"}}
It is fixed by changing the category_id for another one. BTW, I would like to know if is there a way of knowing which categories are allowed and which ones doesn't. It would be nice to know it in advance to disallow some of the Facebook Categories in the editing process of our tool and avoid errors.
Thanks,
David.
Use search?type=placetopic&topic_filter=all in graph explorer to get list of valid place topics

Specify certain values with Facebook Graph request

I was wondering if there's a method to specify certain values of for instance "story" or "name" field when doing a request to the facebook graph. What I'm looking for is something like the following:
/{id}/feed?q={bla}&type={story}
Where I want to check a specific person/page's feed on a certain string of text within each story returned.
Hope you can help me out.
No, that is not possible.
Filtering and searching capabilities of the Graph API are very rudimentary.
When any endpoints support additional parameters of that sort, it is usually mentioned in the documentation.
But there is no way to filter a person’s or page’s feed for specific story types and message contents.

How to get responses and comment attachments with Graph API

I am working on capturing Facebook page, event and group feeds with the Graph API. It's for a research project for my master studies. With these lines in the Graph API Explorer
{page-id}/feed?fields=from,message,likes,comments,attachments
I can capture the most I need. But the responses on comments and the attachments in comments (like when someone uses images in his or her comment) are still missing. How can I get them with the Graph API Explorer? It would be greet if I can get them within the whole context of the feed, not just when typing in the specific comment-id in the Graph API Explorer. Is there any way to get the needed data?
As https://developers.facebook.com/docs/graph-api/reference/v2.7/object/comments#read explains, it depends on the filter modifier whether you only get the top-level comments (toplevel, default), or all comments including replies (stream)
So if you modify your request as follows, you will get comments and replies on them in one go:
{page-id}/feed?fields=from,message,likes,comments.filter(stream),attachments
^^^^^^^^^^^^^^^
But that will give you all comments on the same level in the data structure, so you won’t know which are replies – so you might want to request the parent property as well; for replies that holds the id of the parent comment. With
comments.filter(stream){parent,from,message,created_time}
you will also get the parent for comments that have one. (Once you’re asking for a specific field, you need to ask for the rest of the fields you want as well.)

Facebook Page Comments Using Graph API & Stream Filter

I have my site working using the Facebook Comments Plugin as you can see here http://www.amanzitravel.com/namibia-wildlife-sanctuary
I am trying to use the Graph API to retrieve the comments so they are on the page in a form that is beneficial for SEO (as outlined here https://developers.facebook.com/docs/plugins/comments/).
Ideally I want to see not only all comments, but replies to comments. According to the API (https://developers.facebook.com/docs/graph-api/reference/v2.0/object/comments) using filter=stream should do the trick.
However when I do that I only get the two most recent comments e.g. https://graph.facebook.com/comments/?ids=http://www.amanzitravel.com/namibia-wildlife-sanctuary&filter=stream as opposed to the default https://graph.facebook.com/comments/?ids=http://www.amanzitravel.com/namibia-wildlife-sanctuary where I get all the top level comments but none of the replies.
EDIT: Further to this, it appears to update itself some time later, but when another reply is added it goes back to displaying a subset of all the comments for a period of time. Its unfortunate because it means I can't rely on this to be accurate.
Is there anyway I can make this work properly?

How to find Facebook group id by name

I have a Facebook application, which I would like to be able to read facebook group feeds.
I have a user-input feed url, that looks like this: http://www.facebook.com/groups/music.sharing/
To access the feed though, I can only use its id, like this: http://graph.facebook.com/[id of group]/feed
I cannot find anything for that in the reference, FQL doesn't allow querying by name so .. I'm stuck. Any ideas ?
Thanks!
Its not possible right now, there are multiple open "bugs" and another stating the issue...
All the ways I have tried have failed... e.g. (below would work for pages)
fql?q=select id from profile where username='music.sharing'
We are facing this same problem on our current project. It is not an elegant solution that uses the API, but for now we will be using a workaround by scraping the HTML of the group landing page. The group ID number appears four times on this page in the html via links. The most reliable way to search for the ID is to search for "cid=" as it only appears once (right now, anyway) on the page (what follows cid= is the numerical ID). You'll see what I mean when you examine the html of a group page.
If you found a more efficient solution, I'd be grateful if you shared :)
A possible alternative until bug resolution could be: if you are asking your users for permissions then you can ask for the additional permission, user_groups, and then query graph api http://graph.facebook.com/[id of user]/groups. The returned data has group name, id, version, bookmark_order.