Facebook Graph API Query: Find all friends of a certain gender - facebook-graph-api

I'm working on moving my app's code from Facebook's deprecated FQL to the graph API. Overall, the API makes a lot of sense thanks to the graph explorer tool. I've been able to figure out how to make general queries such as getting all my friends (and each friend's gender, first name, last name, and profile picture):
https://graph.facebook.com/v2.2/me?fields=friends{gender,first_name,last_name,picture}
The main issue I'm running into is figuring out how to make my query more specific. What I really want to do is get all my friends who are females. How would I go about specifying a desired 'gender' here? Is this even possible? Thanks for your help.

Filtering via query is not possible with the current version of the Graph API. You'll have to filter the result of your request in your application unfortunately.

Related

Facebook/Instagram API - Getting Popular Hashtags

I am trying to use the Instagram API for one of my projects. The task I'm trying to accomplish is getting popular hashtags based on an input keyword.
To elaborate a bit: when you're on Instagram, and start typing a hashtag, you get a popup with suggested hashtags related to what you're typing, sorted by popularity.
I'm trying to get these suggestions, but through an API call. Looking at the Instagram API docs, there is Hashtag Search as shown here, but this endpoint searches for posts which use the input hashtag, which is not what I want.
Another post suggested I have a look at Facebook Graph API instead, but again no luck there either.
I know this is possible to do as certain websites which provide services to schedule posts, like this one do it.
So, is there an endpoint in either Instagram or Facebook API that I've missed, or is there any third party API / tool that can accomplish this?
There is not currently any "trending" features as part of Instagram Graph API.

How to connect Rally API (python) to the specific reports under 'Report' section

I have been working on developing a Rally API using python with the help of links pointed by Rally help (Pyral). My code connects well with the Rally server and pulls specific user story I want, but not the columns I am interested in. I am aiming to pull [full] specific reports with fields such as project, tags, etc. under the 'Reports' tab. I tried to find out how can I do it but didn't get direction. Also, the specific user stories I am able to pull include some weird fields like c_name, c_offer and the like. I would really appreciate if someone could help me through this. Like to connect to a specific project/workspace in Rally we have the following code where it asks the details in the manner below:
rally = Rally(server='', apikey='',workspace='',project='')
Is there any way to specify what report/columns I want?
Thanks in advance
Most of the reports on the Reports tab are rendered by a separate Analytics 1 service outside of the standard WSAPI you've been communicating with. Some of that data is available in WSAPI -IterationCumulativeFlowData, ReleaseCumulativeFlowData. What data specifically are you looking for?

get a list of liked videos by user using facebook graph api

I am developing an app on windows phone 8, using the facebook graph api.
for that, i need, for a particular user, all the youtube video posts that he/she has liked ever, but I haven't succeeded till now, in doing this.
in what way i can achieve this?
You might find "FQL/Like" useful for this.
Use SELECT user_id,object_type,object_id FROM like WHERE user_id=me() AND object_type = 'list' instead. Try it in FQL query explorer, and you will see that 'list' are all video results.

Facebook: Graph 'posts' works but FQL 'stream' does not?

this shouldn't be this difficult. I assumed it was a permission thing, but then it doesn't make sense when the graph API gives me the information but the FQL doesn't. :S
so I'm just trying to get the stream from my public page:
http://www.facebook.com/207941570907
So I'm using their tool:
https://developers.facebook.com/tools/explorer
And I give the Graph API Explorer every single permission and I run this:
https://graph.facebook.com/207941570907/posts
And that works perfectly.. but I want to use FQL instead. So I figure running the following would be EXACTLY the same, but no data appears?! It WAS working a month ago, but I don't know what they changed.. sigh:
https://graph.facebook.com/fql?q=SELECT post_id, message FROM stream WHERE source_id = 207941570907
Does anyone have a clue what I'm doing wrong?
I was able to get, using the graph API explorer, the posts from pages I admin. I currently have all permissions for the access token I'm using.
Using the Graph API Explorer tool, I'd suggest looking thru the permissions to see which one you are missing. Or start with all permissions and start taking one by one off until it breaks.

Facebook Page - Get Post feedback and impression via Graph API

I'm trying to get some insights on a list of Posts by a Page on Facebook.
To be specific, I want to get the information highlighted in this blog post via the API.
But I can't figure out how, anyone knows how?
As far as I know it's only possible using the "stream" table. So you've got to use FQL to query this data. Using this technique you'll only get the impressions directly. Feedback rate can be calculated by adding #comments and #likes and dividing the result by #impressions. Hope they'll add this to the insights graph api as well.
MartinHN
Refer to https://developers.facebook.com/docs/reference/api/#analytics
If you are trying to aggregate multiple pages or a page other than the requesting app then you may need grant read_insights permissions to your application.
Refer to http://developers.facebook.com/docs/reference/api/insights/