Over here need to ask whether there is any workaround to get all facebook events even if it is of a particular city.
I have also tried by getting venus and then getting events happening over there, but it is strictly inefficient.
API to get events using lat lng
search?q=*&type=event¢er=37.76,-122.427&distance=1000
But in the response to the above query I found they are for sure not events in any way.
Also there is FQL
https://developers.facebook.com/docs/technical-guides/fql/
This FQL functionality which is now not supported by Facebook, did it used to work earlier and get all the events from facebook.
You can only get events by name, the location parameters are for places only: https://developers.facebook.com/docs/graph-api/using-graph-api#search
Related
In the Facebook Graph API I am able to retrieve the user's wall feed using the following:
/me/feed
And it returns all feeds from the user's wall, however I want to filter this, I want to get everything except likes.
I noticed that the feed type for likes is link and the stuff I need is something like status and photo.
So how do I get every feed except the ones that have the type link and how do I get every feed that has the type status?
Something like:
/me/feed?type!=link
and
/me/feed?type=status
From what I gathered, if you want to filter the data you retrieve in your own way, the way to go is to use FQL, since the Graph API is somewhat limited.
Since I'm not sure if I can do what I wanted with the Graph API, but the info I gathered lead me to believe I can't, I'm marking FQL as my answer.
I'm trying to develop an application wich will get all the facebook events and show it on a iphone application.
My question is what is the best way to retrieve all the public facebook events in PHP. I know there is the FQL and the open graph api but with FQL I cannot retrieve just all the public events and I can't seem to find a way to do this.
Can somebody help me with this ?
Kind regards !
Both FQL and the Graph Api work well. Both are great options.
FQL:
FQL may be faster if you want to get all the events from all a user's
friends.
FQL has a method of getting the count of attendees, maybes,
not attendings, and "no replies" directly, without having to count
yourself, which saves LOTS of time when dealing with 20,000 people
concerts etc. [ IF you want to calculate the gender ratios,
unfortunately then this feature wont help you much ]
FQL has a method of determining who was invited by whom, called "inviter" from the "event_member" table, though it appears to be presently broken: Finding who INVITED you :: Facebook FQL Explorer Bug: "Inviter":null
If you are using FQL, you can use "privacy" to determine if the event is public.
SELECT name, venue, location, start_time FROM event WHERE eid in
(SELECT eid FROM event_member WHERE uid=me())
The Graph:
- You used to check "privacy" for the privacy of an event. It is now depreciated and I believe it doesn't matter now, because only the events you have access to will show up.
$JSON = $facebook->api('/'.$target.'/events?fields=name,venue,location,start_time,description,picture.type(large),attending.fields(gender)&since='.time());
TIP: IF your program should show events for one specific region, can use an app's authentication rather than nag a user to log in and approve your app ( unless you have special customizations for each user).
I am trying to read a user's stream using the facebook graph api. the call is:
https://graph.facebook.com/me/home?access_token=xxxxx&since=yyyyy
I am getting a response but there are a few problems:
Why in the response are some of the posts missing? (whether i am using the parameter "since" or not) I.E. the result I get as a response is not identical to the stream I see as a facebbok user (many posts are missing)
It seems that even if I use the "since" parameter, many of the posts returned are out of the time scope. Any ideas why? I would like to do paging according to specific time periods but it seems facebook api is not working as expected.
thanks
This is because of individual user's privacy settings.
Users can add "Lived places", "Trips" and "Life Events" on a Map on the new Timeline.
As you can get user's checkins via Graph API, I was wondering if it's possible to retrieve those locations as well?
According to the Facebook's Graph API Explorer and documentation this is not currently implemented as a GET possibility in the Graph API.
However, with the appropriate access token, you can retrieve certain aspects of a profile that include a Location ID that can be used to find the Location on Facebook, which you can then retrieve the Address, City, State, Coordinates, etc.
So, all around, the answer is no, at this time, you cannot retrieve Map information with Graph API. Hopefully, Facebook will make this available in the future.
ETA: I just just reviewed the Facebook OAuth Scope List and did some trial and error with the Graph API Explorer. I discovered the following...
While there is a permission scope for "user_location_posts" that must be included in the access token in order to get the location posts (i.e. statuses with a "Place" section) to show up in the feed/posts return from the appropriate GET call, there is no way to only retrieve the posts defined as "user_location_posts." In order to retrieve posts at all, you must first have the "read_stream" or "export_stream" permission which returns everything, not just the location posts.
You're going to need permissions to get the rest of the profile to find the locations on their photos, videos, and any other components that could potentially have a location attached.
There is a strong possibility that there is a Facebook component called "locations". Currently, it returns the GET error "(#100) Subject must be a part of the whitelist" rather than the typical error of "component does not exist". Therefore, it's possible that it's there and that the public does not have access to it at this time. It's also possible that this is just a bug I found.
I am developing an application which would allow a user to better manage their events. However, after reading Facebook's Graph API, FQL and Legacy REST API documentations I did not find a way to obtain the events to which a user has been invited but not yet responded.
Is there any possible way to achieve that?
For some reason this is not covered in the Facebook API docs, but doing a query on the /me/events/not_replied graph path does the trick.
/me/events/{declined|maybe|attending} also work as filters on the /me/events path and pretty much explain themselves. Interestingly enough those three are included in the default /me/events but the events from /me/events/not_replied are not.