Facebook event posts not ordered by date
-
My facebook posts coming from a single event page are not ordered by date. I get the following order:
1. 3 days ago
2. 1 day ago
3. 4 hours ago
4. 1 day agoShould be:
1. 4 hours ago
2. 1 day ago
3. 1 day ago
4. 3 days agoIn your example it seems to working fine:
http://feedthemsocial.com/facebook-event-feed-demo/Any idea on this one?
-
Hey @micheldb,
Sorry for the troubles. Can you please provide us with an example link of feed and also Facebook page so we can compare.
Please also provider shortcode and the Report for the settings page under the Feed Them tab when logged into the WordPress dashboard
Thanks,
Justin LabadieHi Justin,
This is the requested info:
Test url: goo.gl/oRsakj
FB page: https://www.facebook.com/events/659056210921205/[fts_facebook id=659056210921205 posts=5 title=no description=no words=45 type=event grid=yes space_between_posts=4px colmn_width=210px center_container=yes popup=yes hide_like_option=yes]
For the report, do you mean the system info?
Kind regards,
Micheloops yes! sorry I mean the System Info page. My apologies!
Justin
no problem. Here it is:
### Begin System Info ###
Feed Them Social Version: 2.0.9— WordPress Configuration:
WordPress Version: 4.6.1
Multisite: No
Permalink Structure: /%postname%/
PHP Memory Limit: 256M— Webserver Configuration:
PHP Version: 5.6.26
Web Server Info: Apache— PHP Configuration:
Safe Mode: No
Upload Max Size: 256M
Post Max Size: 256M
Upload Max Filesize: 256M
Time Limit: 300— Active Plugins:
Feed Them Social (Facebook, Instagram, Twitter, etc): 2.0.9
Feed Them Social Premium: 1.6.4— Custom Token or Keys added to Options Pages
— You must have a custom token to use the feedsFacebook App Token: Yes
FB App ID for Like Button: No
Twitter Consumer Key: No
Twitter Secret: No
Twitter Token: No
Twitter Token Secret: No
Instagram: Yes
YouTube: No— Offset Post Limit:
Offset Facebook Post Limit: None
Hide Notice on Front End: Yes— FaceBook & Twitter Date Format and Timezone
Date Format: one-day-ago
Timezone: Europe/Amsterdam— Fix Twitter Time:
Fix: No
— Disable Magnific CSS:
Fix: No
— Fix Internal Server Error:
Fix: No
— Load More Options:
Override: No
— Premium License:
Premium Active: Yes
### End System Info ###
Thanks for info! Looking into this now. 🙂
@micheldb After printing the array for this shortcode oddly it appears facebook is returning the posts out of order too. It’s definitely a glitch of some kind no doubt.
We will place a bug report with facebook about the problem… although it can take some time before a patch is made or if at all. I’ve seen it take years for them to address stuff unless it’s a major catastrophe.
Next week I’ll look into doing a date sort order shortcode option to fix these types of issues should they popup again.
Spencer
-
This reply was modified 9 years, 7 months ago by
slickremix. Reason: missing the word 'all'
@micheldb Actually just took a second to make this little fix which I will implement fully on the next update.
If you open up the facebook-feed.php file…
wp-content/plugins/feed-them-social/feeds/facebook/facebook-feed.php
Then look for around line 557 or so… it will say something like.// Loop for all facebook feeds. foreach ($feed_data->data as $post_data) {.....Just before that add this….
usort($feed_data->data, array($this, "dateSort"));Let me know how it goes and have a happy hacking weekend!
Spencer
Hi Spencer,
Thanks a lot for looking into this.
Adding that line doesn’t make a difference. I still get the unordered list.
Have a nice weekend!
Mich
Oh shoot I forgot that is a new date sort function… Add this to the top of the page on like line 37.
function dateSort($a,$b){ $dateA = strtotime($a->created_time); $dateB = strtotime($b->created_time); return ($dateB-$dateA); }And yeah the usort should go on around line 442… I was working on a file that I had added a bunch of new code too so the I had to look at the original file to give you the proper line number.
usort($feed_data->data, array($this, "dateSort"));Hi Spencer,
Super! this works!
Thanks a lot for the quick fix.
Have a nice weekend.
Mich
@micheldb Awesome and you too!
When you have a second if you wouldn’t mind leaving a review for us, we would be very grateful.
https://ww.wp.xz.cn/support/view/plugin-reviews/feed-them-socialOr if you have a facebook account and want to leave a review for us there, that would be awesome too.
https://www.facebook.com/SlickRemix/reviews?ref=page_internalSpencer
-
This reply was modified 9 years, 7 months ago by
The topic ‘Facebook event posts not ordered by date’ is closed to new replies.