Forum Replies Created

Viewing 15 replies - 1 through 15 (of 22 total)
  • Thread Starter Joris

    (@jvanhurne)

    in my front-end in never even showed this long list.

    But I can definitely confirm that this issue has been resolved!

    Thread Starter Joris

    (@jvanhurne)

    [Large code excerpt removed by moderator per forum rules. Please use the pastebin for all large code excerpts. It works better anyway.]

    Thread Starter Joris

    (@jvanhurne)

    Update: got syncing up to 250 events & locations

    Thread Starter Joris

    (@jvanhurne)

    ideally, importing all the data from the query below, would be possible. Basically, this one query contains all the data I need. (but I’m guessing, there is a bit more to it than that)

    https://graph.facebook.com/v2.3/me?fields=id,name,events{id,name,cover,owner,place,start_time,end_time,description,ticket_uri,attending_count,attending,picture{url,height,width}}

    (me= 120011001664839)

    Thread Starter Joris

    (@jvanhurne)

    Some references I found. I hope they are in any way useful for you.

    https://developers.facebook.com/docs/graph-api/using-graph-api/v2.0

    https://developers.facebook.com/docs/marketing-api/api-rate-limiting

    Making Large Requests
    Some Graph API endpoints can take parameters that are very large. If your requests end up being larger than a couple thousand characters, you may start seeing server errors since our servers will reject very large GET requests.

    As a best practice, for large requests use a POST request instead of a GET request and add a method=GET parameter. If you do this, the POST will be interpreted as if it were a GET.

    Thread Starter Joris

    (@jvanhurne)

    Hey Franky, i was looking in to ways to combat the script time-out. Almost every source referred to adding a line of code the PHP.ini to set the time-out timer. Being on shared hosting, of course I don’t have access to PHP.ini

    So I was glad to find another solution for this. And actually it could not be any simpler:

    I added the following to the top of eme-sync-facebook-events.php

    // set the PHP timelimit to 10 minutes
    set_time_limit(900);

    which sets the runtime of the import script to 15 minutes.

    This got me a return of around 200-225 synced&skipped events/locations in 3 different test runs, but of course it would be to easy if everything would be solved this way. After syncing around 200 events/locations the same mid-sentence stop occurs….and since this happened after about 4-5 minutes it shouldn’t be the script timing-out, that is causing the sync to stop.

    Thread Starter Joris

    (@jvanhurne)

    I definitely realize that I am pushing limits with the amount of events, although I already found several topics about optimizing graph API queries. I’ll post some link later, but i’m sure you’ll know 100% better and faster what is useful.

    Or maybe something in the WordPress settings that could help?
    I’ve read something as well about the “limit” of API Calls (600/600seconds)?

    —–
    PS. Unrelated question: (I could start a new topic for it if you’d like)
    Can Events be somehow linked to the standard WordPress Categories? (so my theme can recognise these categories for front page display?
    —–
    Thanks again for the awesome work!

    Thread Starter Joris

    (@jvanhurne)

    Hey Franky,

    thanks again for another quick response!

    Since 120011001664839 is my own page (for which I very recently changed all the settings to make it as invisible as possible) it makes sense you weren’t authorized for that one.

    First the good news: it looks like the syncing/importing is working well now for the pages with a larger amount of events.

    ….but then i tried 120011001664839, which has a little over 400 future events at the moment.

    Syncing it, returns a list of about 170-175 “skipped already synced” events and locations and then this list breaks in the middle of a word/sentence like this:

    Skipping already synchronized location: 65
    Skipping already synchronized event: 266
    Skipping already synchronized location: 6
    Skipping already synchronized event: 407
    Skipping already synchronized location: 20
    Skipping already synchronized event: 392
    Skipping already synchronized location: 78
    Skipping already synchronized event: 408
    Skipping already synchroni

    I hope you still got some more awesome tricks up your sleeve. I will try to find out as much as i can about the issue and will post an update if I have more info for you.

    Thread Starter Joris

    (@jvanhurne)

    Probably unrelated but, WordPress debug returns the following:

    Trying to get property of non-object in /mnt/webs/d1/04/54531604/htdocs/WordPress_10/ehv-content/plugins/eme-sync-facebook-events/eme-sync-facebook-events.php on line 137

    (Using the original code)

    Thread Starter Joris

    (@jvanhurne)

    hey Franky,

    I’ve been trial and error testing for quite a while now.

    syncing 121153551291897 worked. so did 179834762070641

    directly after that, syncing: 70293002984 – 120011001664839 – 603911446364811 – 241075242578078 returns a blank screen.

    Without the “graph paging code” these page IDs don’t give any problems.

    I wish I could give you more useful info, but I’ve been checking about 20 different ID’s. Some of them do sync, others don’t and I can not discover any kind of logic or pattern in it.

    PS. Just of the top of my mind: I have noticed some irregularities in the locations that are imported with some events. Could it be that the problem lies in how EME deals with graph properties Place/location and Owner

    Thread Starter Joris

    (@jvanhurne)

    Hey Franky,

    i’ve been trying again and fiddling with the facebook app settings to see if it would be helpful, but no such luck.

    the problem I have is still the same as before.

    could you check if it works for you with the following Page IDs:
    70293002984 (de Effenaar – Concert Venue)
    121153551291897 (Muziekgebouw – Concert Venue)

    These two FB pages are the ones with the most (public) events. In the old situation, the events were imported, but cut off at paging of the graph.

    With the new piece of code, the page is “loading for quite a while” but suddenly stops and leaves nothing but a blank page.

    Good luck again! And thanks already for your help and efforts.

    Thread Starter Joris

    (@jvanhurne)

    Strange indeed….

    I will give it another try in a couple hours. Double-checking that i didn’t miss anything and that the code I used is 100% right. (though i’m sure it was before)

    Anyway, in your expert opinion, do you think that the problem could be could caused by limited memory of the shared server that I am on?

    When you did your testing, was this for a website on a shared server as well? or something more dedicated and powerful?

    Thread Starter Joris

    (@jvanhurne)

    I’ve tried it and it looked very hopeful,

    it was loading about a minute or so, but unfortunately after this minute the loading stopped, leaving a totally blank page.

    I have checked it with various other page id’s as well and it only seems to work on pages with just a few events. Up till about 5 or 6.

    Syncing a page with more events than that results as well in a totally blank page, after about 1 minute of loading. I do want to note that before the changes in the code these pages did sync just fine.

    Thread Starter Joris

    (@jvanhurne)

    https://wpfbevents.com/

    and another plug-in which might be usefull as a reference i hope…

    Thread Starter Joris

    (@jvanhurne)

    https://www.ads-software.com/plugins/facebook-events-widget/

    This plugin works very well in quickly getting and displaying all fb events of my page, but lacks the control that EME offers. I think it might offer good reference…

Viewing 15 replies - 1 through 15 (of 22 total)