this is maybe a stupid question, but is it possible, for an Facebook App to query a user search like in Facebook itself. For example: How to find all Users by there Hometown, school, etc?
All I found was to search for specific users by their username.
Thanks Guys!
EDIT
#Tobi is right in that you cannot achieve this through targeting. Check out this answer:
Can I use Facebook social graph to show users who graduated from a particular college/university?
Old Answer
Using the endpoint:
/search?q={query}&type={type}
you can query by location as well.
Check out the Searching Section Here:
https://developers.facebook.com/docs/graph-api/using-graph-api/v2.0
And the Targeting Section Here:
https://developers.facebook.com/docs/graph-api/reference/v2.0/targeting/
Hope it helps!
Related
Like this
http://postimg.org/image/l6bq0bf5l/
It's show at popup.
I know that this feature has arrived for less than half yearand this feature don't have for every pages.
How I get that 4.2 score for using in my PHP?
Thanks.
PS. I try to use review table but I don't know how to use it. Place and page table, review and rating don't included.
You can use the
/{page_id}/ratings
endpoint. See the docs here: https://developers.facebook.com/docs/graph-api/reference/page/ratings/ Note that you need a Page Access Token for this.
It's simple how can I search a post in Facebook with the API Facebook:
https://graph.facebook.com/search?q=logo&type=post
This query retrieve all public posts which contain the word "logo". But, how could I search a post in a specific Fan page? Is it possible?
Thanks in advance.
Alternative Solution:
I have thought of a hybrid solution: I can get all the posts with that query:
https://graph.facebook.com/search?fields=object_id&limit=25&type=post&q=logo
and through php to restrict only those belonging to specific Fan Page. Although I have a question, over what period of time the search is done?
What do you think?
To search in posts in page, use this:
https://graph.facebook.com/page_id_here/search?q=keyword_here&type=post
Alternative Solution:
I have thought of a solution hybrid: I can get all the posts with that query:
https://graph.facebook.com/search?fields=object_id&limit=25&type=post&q=logo
and through php to restrict only those belonging to specific Fan Page. Although I have a question, over what period of time the search is done?
What do you think?
I've been searching & found it's probably not possible.. but I thought I'd ask anyway:
I have this facebook page & I'd like to display the user-images(=avatars) of everyone who liked my page. I think it's really strange this isn't possible using the facebook API!
So basically I need to retrieve a list of users who liked my page. Something like this: (yet likes doesn't exist).
https://graph.facebook.com/page_name/likes?access_token=token
If I'd use the simple facebook plugin - it does display user images of people who liked my page.; so how come the plugin can retrieve these images but API can not ?
Any help is much appreciated!
thanks in advance,
Ben
There isn't an API call or FQL query you can call to get the list of users who like the page. Facebook has prevented this type of call for privacy reasons. You should stick with using the plugin instead.
I have to show a list of nearby stores, hospitals, cinemas and all according the user's latest location. I have done this thing using Facebook and Google APIs,
like this:
Google: https://maps.googleapis.com/maps/api/place/search/json?location=%f,%f&radius=2414.016&sensor=false&key=YOUR_API_KEY
Facebook: https://graph.facebook.com/search?type=place¢er=%f,%f&distance=1000&acces_token=YOUR_ACCESS_TOKEN
How can I achieve the same thing in Foursquare?
https://developer.foursquare.com/docs/venues/explore.html
You can do that by following link
http://api.foursquare.com/v1/venues?geolat=yourlatitudevalue&geolong=yourlongitudevalue&q=yourkeyword.
for example restaurant keyword
http://api.foursquare.com/v1/venues?geolat=23.0081171&geolong=72.5234406&q=restaurant
You can find samples for API under following link.
https://developer.foursquare.com/docs/samples.html
Hope it helps.
I want to do a simple thing yet it seems none of the FB api options (Graph/others) seem to be able to solve it.
Say "Johny Brown" is my friend and I want to include his name in a wall post. What I can do is type #Johny Brown then facebook shows a nice dropdown from which I can select his name.
However the same behavior cannot be mimicked using Facebook API.
Any tips will be greatly appreciated. I tried "#" before name, using full url, using "Name" etc. None of them work.
yup you're correct. in the new graph api facebook simply removed this feature (possibly due to too much spamming).