Retrieving place will raise error in Facebook event download - facebook

There is only one field of difference between the two Facebook Graph Query. One will succeed, oter will fail. Why place makes it different? Anyway the error message has no meaning at all.
Using following query: 1105135492844152/events

Related

Some items are missing when using since parameter

I'm facebook graph API user.
Recently found that since parameter works weird.
I'm using that to find all upcoming events and filter out past events for a particular venue.
For instance:
When I use query like this
/v2.5/481931581856759/events?access_token=&limit=5
I getting all events.
But if I add since variable, some events are missing
/v2.5/481931581856759/events?access_token=&limit=5&since=1471468270
In this case can not find an event with start_time "2016-10-28T19:00:00-0700".
Why that happens or I misunderstand something?

An unknown error has occurred on Graph Facebook

I tried to get Data from Facebook Page with the graph of Facebook but I have a problem.
When I try to go on link like:
https://graph.facebook.com/ID-PAGE?access_token=MY_ACCESS_TOKEN
I always do this to have the Data from a Page but since today I have the error Message: "An unknown error has occurred".
Thanks for help.
EDIT:
The bug is fixed : https://developers.facebook.com/bugs/486654544831076/?search_id
Have a look at my answer at
How to get user email and birthday from Facebook API Version v2.4
You have to specify each field you want to query now with v2.4. If you want to explicitly use v2.3, you need to prepend your calls by /v2.3 like this:
/v2.3/{page_id}?access_token=MY_ACCESS_TOKEN
Seems like there's currently a bug regarding requests made with app access tokens instead of user access tokens:
https://developers.facebook.com/bugs/486654544831076/
At this moment, I pretty much figured out what is happening, and it looks like a bug in the Facebook API.
For v2.3 and lower:
The /PAGE-ID call will return an Unknown server error when you don't pass ?fields=username (for example). If you do pass the fields option, it will work. You can get it out of the docs.
For v2.4:
This will work, but you will miss a lot of data, so you'll also have to pass the fields options. But if you don't pass that, this version will give you back only the most basic of details. This is as described in the version release: https://developers.facebook.com/blog/post/2015/07/08/graph-api-v2.4/
So the solution for now, would be to add the ?fields= everywhere you need, or to wait for Facebook to maybe ever solve it.
(And while you're at it, you might as well upgrade to v2.4 ;-)

Facebook until empty results

Anybody knows why i get no results back when i add the untill parameter in facebook?
Requested url: https://graph.facebook.com/FBID/home?limit=25&until=1388688636
How do i replicate this:
Go to: https://developers.facebook.com/tools/explorer
Execute the above url (FBID/home?limit=25&until=1388688636)
In the returned results go to the bottom and click the link that got the json key: "next" (looks like: "next": "https://graph.facebook.com/FBID/home?limit=25&until=1388688639")
The returned result is:
{
"data": [
]
}
i searched for ages about this problem and could not find it, the only thing i can come up with is that Facebook only returns posts since the permission accept for the Access Token, another cause could be that Facebook is broken.
This is standard (albeit undocumented) behavior. The empty data array shows up when you try to access an object that has its privacy settings configured to not let third party apps read it, and it's also what's being displayed after you've reached the end of all public records of the current user.
You just have to deal with it. Keep looping over the next result while data != empty is true.
Update: This could also be related to an open issue Facebook is aware about, namely broken pagination. The problem seems to be "dead ends". You can read more about it here and try fiddling around with the timestamp and limit parameters of the request.

How can I query public facebook events by location/city?

I've been trying to figure out how to do this, and was thinking it wasn't possible, then found this website: (Removed due to a dead link)
You can search by city there and I have no idea how they do it? The normal graph API's don't allow searching for events by location as far as I can see. Any advice/tips/info would be great!
Updated 2014-07-02
You can't directly search the Facebook API for events near a location. Since originally giving this answer, the Graph API has made it harder to search for events.
The Elmcity script referenced by the OP does a simple search for a keyword in the event title. Try "Lancaster" for example. You'll get events that have the word Lancaster somewhere in their metadata.
Their query looks something like this:
https://graph.facebook.com/search?q=lancaster&type=event
You can also search for a non-location based word in the title like "picnic" and the script returns events.
For the problem of actually finding events near a location, in the current iteration the "venue" field is only a string, so it has no relationship to any Facebook place. Running these query returns nothing:
https://graph.facebook.com/madisonsquaregarden/events
https://graph.facebook.com/108424279189115/events
So using a batched request isn't even a possibility.
According to the documentation FQL seems to be a better solution. In the event documentation, the venue.name column is indexable! Easy, right?
Wrong. When you run this FQL query to find events at some location like this:
SELECT name, start_time, venue FROM event WHERE CONTAINS("madison square garden")
You find that venue.name isn't populated.
Trying any other variation like:
SELECT name, start_time, venue FROM event WHERE venue.id = 108424279189115
Throws a "statement not indexable" error.
So while building a "Facebook Events Near Me" is the killer app, the only way that it seems possible is to search for common strings for events near you, get those events, then filter out irrelevant events from the result set.
This JavaScript library on GitHub seems like an interesting approach to look at. It uses a places search and then does an events search on those places.
tobilg/facebook-events-by-location-core
As of recent. the Events end points have been deprecated due to the privacy issue.
Your app will now need to be reviewed first to access events api, when it resumes.
Events and points has been deprecated due to privacy issues. Now you have to review your app before you can access events api. After successful approval you can search events.
So what you can do is enter "Events", but you need to enter the date, or tomorrow after that. Then, on the right, in your filters, enter the location field, select other, then punch in the location you want.

fbgraph error code

Does anyone know where can I find all the error code and error type for FBGraph? While handling error, I want to check what error FBGraph throws (like: duplicate post error, access token expire error) and take action accordingly. (I a working on Ruby On Rails 3)
I referred the documentation, but it doesn't list out the code and type of all the errors. Where can I find these error codes?
Thanks... :)
This has long been a problem with using the Graph API. There's no documentation anywhere as to all the possible errors that you can receive. Additionally there are errors that you receive randomly that don't occur when you make the same request again (ie bugs).
A lot of the Graph API seems to have an underlying structure that makes FQL queries. So, when those FQL based queries throw an error you can find the code here: http://fbdevwiki.com/wiki/Error_codes#FQL_Errors