Is it possible to combine /me and /friends queries into one?
I tried /?ids=me,friends but obv it didn't work, any other way?
You can use me?fields=id,name,friends
Related
i have an api(web service) in django like this:
http://127.0.0.1:9000/api/back_office/appointments/days/?branch=1
that in swagger i want to input query parameter named branch but don't work this(all of my Apis have same problem!!).
before, i use older version of swagger and for enter query parameters use like --param_name syntax, but now in django-rest-swagger==2.1.1 don't work this syntax.
can anyone help me?
Perhaps i should use get_customizations in OpenAPIRenderer class?
Thanks in advance.
For adding query parameters to swagger please, go through this post
Is there a way to see how my Elasticsearch query is rendered? Not the results, but the query itself. I'm having some problems and I would like to debug, but I don't know how.
Thank you!
Try GET /_validate/query?rewrite=true
reference: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-validate.html
I seem to be having problems with this in the twitter API.
I want the global data from the API which includes :
1. All those posts from the users I am following.
2. All those posts from the users I am not following.
Is this possible with the twitter API ? Has anyone tried it before ?
I'm using python, but any type of answer would be helpful.
Yes it is possible.
What you can do is say create a list of customers(those whom you follow) in a database...now check for each tweet if it from your customer then pass if not then do as desired.
if you can get data of those whom you are following then you can also get data of those whom you are not following
I want to get only like count and not like data, can it be done using fields=like_count or something?
Yes, you can use fields to get only those properties. check this, some fields are fixed for some objects.
If you use fql, use . operator eg:
user.email
I want to know which people in a list of people are friends with this user. Is there a graph api call that can return the subset of ids that is the user's friends? I've tried:
/me/friends/?ids=xxxxx,xxxx
I know I can use a batch call an do something like this:
/me/friends/xxxx
/me/friends/xxxxx
but it would be nice to do it in one call.
There wasn't an easy way to do this with the graph api, but I was able to do it with an FQL query:
query = '{
"are_friends":"SELECT+uid2+FROM+friend+WHERE+uid1=me()+and+uid2+in('+people_array.join()+')+limit+10",
"friend_meta":"SELECT+uid,first_name,last_name,name,pic_square+FROM+user+where+uid+in(SELECT+uid2+FROM+%23are_friends)"}'
The friend_meta json object in the result will have all the meta info you are looking for. It's one call, and more efficient and cleaner than the batch calls.
Did you try the mutualfriends option?
me/mutualfriends/xxxxx
https://developers.facebook.com/docs/reference/api/user/