Home › Forums › Calendar Products › Event Aggregator › Facebook Imports: No Categories
- This topic has 5 replies, 4 voices, and was last updated 7 years, 8 months ago by gerikg.
-
AuthorPosts
-
June 26, 2016 at 9:00 am #1132093gerikgParticipant
Just following up on this: https://theeventscalendar.com/support/forums/topic/facebook-import-no-categories/
I don’t see an option for the categories.
Here are the fb categories
The plugin is great. Any plans to import the categories too or have it “match” with the current ones on WP?
If no, would this be a paid service?
Here are the facebook event categories
Arts
-Art
-Books
-Film
Causes
-Fundraiser
-Volunteering
Community
-Family
-Festival
-Neighborhood
-Religious
-Shopping
Entertainment
-Comedy
-Concert
-Dance Performance
-Nightlife
-Theater
Food & Drinks
-Dinning
-Tasting
Interests
-Conference
-Meetup
Learning
-Class
-Talk
-Workshop
Sports & Fitness
-Fitness
-Sports Game
Other CategoryJune 27, 2016 at 10:41 am #1132488GeorgeParticipantHey @gerikg,
Thanks for reaching out!
The hook that Brian mentioned in that thread indeed exists now, and you can use it to assign a category to all events upon import.
Now, it’s a bit tricky to assign per-event categories, i.e. it is a bit tricky to have one event go into one category, then another event into another category, and so on. But this is possible to some degree.
But you can use the event, venue, and organizer information to assign a category to events.
The new hook is called tribe_events_facebook_event_created.
☝️ That action is fired when an event is imported from Facebook and successfully created within WordPress.
Here’s an example of how to use that action:
function tribe_add_categories_to_fb_events_upon_import( $event_id, $organizer_id, $venue_id ) {if ( ! $event_id )
return;// An array of IDs of event categories we want this event to have.
$cat_ids = array( 6, 8 );wp_set_object_terms( $event_id, $cat_ids, 'tribe_events_cat' );
}add_action( 'tribe_events_facebook_event_created', 'tribe_add_categories_to_fb_events_upon_import', 10, 3 );
We cannot yet pull the categories from Facebook, but with this hook you can achieve many things upon the importing of an event and I hope this helps.
Let me know what you think, and what other questions you might have on this.
Thank you!
GeorgeJune 27, 2016 at 10:49 am #1132489gerikgParticipantDoes this help? It mentions the categories
https://developers.facebook.com/docs/graph-api/reference/eventJune 27, 2016 at 11:18 am #1132505GeorgeParticipantHey @Gerikg,
Thanks for sharing this! This refers to the Facebook API’s implementation of its own categories structure; our plugins do not handle these categories or import them from Facebook at this time.
Sorry to disappoint about that—I hope the information I shared in my previous is helpful nonetheless!
Sincerely,
GeorgeJuly 12, 2016 at 9:35 am #1138707Support DroidKeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Facebook Imports: No Categories’ is closed to new replies.