cottonkoen
Forum Replies Created
-
got it working now! Made a stupid mistake: I was using custom meta-boxes for the date in this theme -> I needed to send those metabox post fields to facebook.
Did it like this:
$attachment['start_time'] = $_POST['_year'].'-'.$_POST['_month'].'-'.$_POST['_day'].'T'.$_POST['_hour'].':'.$_POST['_minute'].':00+0000';
Thanks for helping.
Would you like a write-up when I finish this event function, maybe as a starting point to add event functionality to the plugin somewhere down the road, or is this out of the scope of your plugin?true, bad example. I was actually trying to auto add an event to facebook, not using stream. I need a customfield to populate the ‘start_time’. https://developers.facebook.com/docs/reference/api/event
This snippet https://pastebin.com/TFaWR3HY already adds an event, but with a hardcoded start_date. I can’t add the event time from custom fields (I try this in the snippet with ‘end_time’. This isn’t send to facebook).
Any thoughts on this isue (sending customfield on autopost)? Can’t find solution to this in codex or other posts.
Forum: Plugins
In reply to: get_connected array sortingPerfect, thanks!
In alpha I now see the reciprocal connection, but I can’t see the metabox in the orignal/ancestor (?) post.
p2p_register_connection_type('game', 'team', false);
Shows a metabox to link a team for each game. The team content isn’t aware of a link with different games.
p2p_register_connection_type('game', 'team', true);
Metabox to link a team isn’t showing anymore. The team content is however showing linked games.
Thanks! Working now.
I’m trying one other thing: I want to add a customfield value when autoposting. Can’t figure out how to call this data and send it with the autopost function.
I tried this:
$attachment['link'] = get_post_meta($post->ID,'event_link1',false);
But I guess this can’t be called upon posting.
Any insights?