Home › Forums › Calendar Products › Event Aggregator › How to get facebook page id?
- This topic has 8 replies, 3 voices, and was last updated 10 years, 1 month ago by
Leah.
-
AuthorPosts
-
February 10, 2016 at 12:55 pm #1071052
Fredrik
ParticipantHi!
I found this function which gives me the event ID. Can you provide me with a solution to get the page id of an event?
function tribe_link_to_fb_event() {
// Check if the event is associated with a Facebook event
$fbid = tribe_get_event_meta( get_the_ID(), '_FacebookID' );
if ( empty( $fbid ) ) return;
// Form and display a link to the FB event page if so
echo '<i class="fa fa-facebook-official"></i> Arrangementet er hentet fra <b>Facebook.</b>';
}
add_action( 'tribe_events_single_event_after_the_content', 'tribe_link_to_fb_event' );
Cheers!
FuzzFebruary 10, 2016 at 10:41 pm #1071175Geoff B.
MemberGood evening Fuzz and welcome to the Events Calendar Support forum!
Thank you for reaching out to us.
We will gladly try to answer your question.To be honest, I would do a much better job at answering if I had a bit more context to what you are trying to do exactly ?
When you are talking about a page ID, what are you referring to (the FB event, the Events Calendar’s event in WordPress ?).
If you could expand on that I would be glad to point you in the right direction.
Have a great day!
Geoff B.
February 11, 2016 at 4:49 am #1071252Fredrik
ParticipantHi
I apologize if I was unclear, I wrote it in a hurry 😉
I basically need the events parent facebook page id. The event facebook ID (_FacebookID) gets stored as meta after an import. To import events from facebook with your plugin it requires input of parent page FB IDs.
So the question is: Does the parent FB page id get stored anywhere, and if so – how do I get it?
Thanks!
February 11, 2016 at 8:15 pm #1071813Geoff B.
MemberGood evening Fredrik,
Thank you for clarifying this.
Actually the Facebook event ID also gets stored in the wp_posts table as part of the post title (as I’m sure you found out already).To the best of my knowledge, we do not store the Facebook page ID anywhere.
I wish I had a better answer for you, but for now it’s the best one I have.
Have a great day!
Geoff B.
February 11, 2016 at 8:19 pm #1071814Geoff B.
MemberHowever, you might be interested in the following snippet (not quite the same, but really useful nevertheless).
Best regards,
Geoff B.
February 12, 2016 at 4:11 am #1071887Fredrik
ParticipantHi
Thanks for your reply:)
Hopefully in the future releases, you can include a meta field for it without me having to hack the plugin. There is a lot of relevant data from the parents fb page to make imported events even more informative, which was my goal.
To avoid confusing future readers of this thread, the snippet you provided is the same as in my original post.
Have a great weekend!
FredrikFebruary 12, 2016 at 9:29 pm #1072331Geoff B.
MemberGood evening Frederik,
Thank you for your suggestion and point taken.
I will submit your idea to the Dev team.Have a good week-end,
Geoff B.
February 15, 2016 at 9:50 am #1073346Geoff B.
MemberGood afternoon Frederik,
One last note, if you don’t mind, could you please make a request for this feature on our wonderful User Voice forum ?
Have a great day!
Geoff B.
March 14, 2016 at 2:02 pm #1088757Leah
MemberHello,
Thank you for bringing this to our attention. We weren’t able to add the new CSV Importer fields as part of our upcoming release (4.1). However, please know that this is still on our radar and is ticketed within our system to be addressed in a future release. We’ll do our best to keep you posted. Thank you for your patience while we improve and expand our plugins.
Best,
Leah -
AuthorPosts
- The topic ‘How to get facebook page id?’ is closed to new replies.
