Question

I'm building an app which will aggregate events its users add to it. I'd love to be able to let people paste in an Eventbrite URL and then figure out what the event's ID is so I can pull data about it from the API.

I'm having problems figuring out a sensible and reliable way to do that.

  • Sometimes the event has the EID in the URL, as in www.eventbrite.com/event/3213651117
  • Sometimes they don't, as in yurisnightla-ehometext.eventbrite.com/

There's a <link rel="canonical"> tag which, in the case of the Yuri’s night example above points back to the custom domain rather than a plain eventbrite page, so www.eventbrite.com/event/3219837621 points to yurisnightla-ehometext.eventbrite.com/.

There's a <link rel="alternate" type="text/calendar"> tag which has the Event ID embedded in its URL, but it 404s, so I'm a little unsure about trusting it (it'd be good to verify it first by GETting it).

At the moment searching the <link type="text/calendar"> seems like the best bet, but I'm worried about its longer-term viability, given the 404s. Is there something else I'm missing? Is there an official way to do this?

Était-ce utile?

La solution

Eventbrite doesn't really have tools available for resolving an event_id from the custom subdomain event page URLs (which are optionally available).

You might be able to find these events using the event_search API method.

All published Eventbrite event pages will always be accessible via the following URL scheme (regardless of whether they have a custom subdomain url configured): http://www.eventbrite.com/event/YOUR_EVENT_ID

If you can find the event_id, then any links that are crafted using the above URL structure should always be valid.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top