How to get facebook page id?

Home Forums Calendar Products Event Aggregator How to get facebook page id?

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1071052
    Fredrik
    Participant

    Hi!

    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!
    Fuzz

    #1071175
    Geoff B.
    Member

    Good 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.

     

    #1071252
    Fredrik
    Participant

    Hi

    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!

    #1071813
    Geoff B.
    Member

    Good 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.

    #1071814
    Geoff B.
    Member

    However, you might be interested in the following snippet (not quite the same, but really useful nevertheless).

    Best regards,

    Geoff B.

    #1071887
    Fredrik
    Participant

    Hi

    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!
    Fredrik

    #1072331
    Geoff B.
    Member

    Good 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.

    #1073346
    Geoff B.
    Member

    Good 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.

    #1088757
    Leah
    Member

    Hello,

    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

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘How to get facebook page id?’ is closed to new replies.