Home › Forums › Calendar Products › Event Aggregator › How to get URL (or at least the numerical ID) of events imported from Facebook
- This topic has 4 replies, 2 voices, and was last updated 9 years, 7 months ago by Josh.
-
AuthorPosts
-
September 24, 2014 at 1:17 pm #764422jjstavernParticipant
Hi there,
I have the Facebook Events Importer set up to grab events from my client’s Facebook page so that they can also be displayed on his main web page, and it’s working great. However, there’s one pretty big problem.I’m probably just missing something, but I’ve been looking fairly hard and I can’t seem to find how to get the link to the actual Facebook event that each now-Tribe event was imported from. This is really very important, as I want to be able to add Facebook like/share buttons to each event, along with an ordinary link to each event on Facebook so that viewers can go there to say they’re going to it, etc.
None of that should be at all hard to write, but I just need that URL (like: https://www.facebook.com/events/302415006611824/), or at least the unique number from the end of it, for each imported event so that I can construct the links and feed the Facebook API.
So, in short, how can I get it?
September 24, 2014 at 8:17 pm #765045JoshParticipantHello jjstavern,
Thanks for contacting us!
The original Facebook event ID is stored as a custom meta field for each event when it is created. You can access the field using get_post_meta and using the
_FacebookID
key.Let me know if there is anything else I can do to help.
Thanks!
September 24, 2014 at 8:37 pm #765085jjstavernParticipantAwesome, that does the trick. Thanks so much!
September 24, 2014 at 8:39 pm #765089jjstavernParticipantOh, I should mention for anyone else looking at this that the key “_VenueFacebookID” failed with an error. “_FacebookID”, however, worked like a charm. Thanks again!
September 25, 2014 at 6:24 am #765913JoshParticipantHello jjstavern,
Thanks for following up!
You’re right, looks like I copied the wrong meta key in the initial response. I’ve updated that response with the correct key.
I’ll go ahead and close this ticket. If you have any further questions please don’t hesitate to open a new one.
Thanks!
-
AuthorPosts
- The topic ‘How to get URL (or at least the numerical ID) of events imported from Facebook’ is closed to new replies.