Guys, I have a Wix-page with an html-component. Inside it, it runs fullcalendar scheduler. The problem is that I need to know which wix-member is doing the request (from fullCalendar) to (Wix) http-functions to provide the data. This is impossible in a standard way, because 1) the html-component with2) http-get´s to Wix are wix-member agnostic (and rightly so, wixUsersBackend cannot have a clue which user is meant where you have several logged on).
To solve this, I plan to do this:
on wix-page level (with the html-component), generate a token (and insert into collection)
postMessage the token to html-component holding fullCalendar;
fullCalendar wait for token and, when received, attaches it to query-string calling the http-get on Wix side
4)http-functions check validity of token, and if correct, do query with token for the correct wix-member and hand over the data
This will work, but it feels a bit like the long way around. Do any of you geniuses have a better idea?
Can you share a bit more details on the operation you are trying to do in fullCalendar? I don’t understand why you have to do the round trip with http function
Can’t you just use html message to communicate with fullCalendar?
Hey Quentin, you´re still up late. Answer to your question is: save work. fullCalendar has all this functionality built in which offers going back and forth in time, without coding, like so:
You set a URL (in this case, to wix-http funcs) and all is done automatically: click another month, a week back, a week into the future, etc . So yes, I think I could hand over an array (read that somewhere in the docs), but you will have to do all navigation yourself.
I´ll think about it some more, see if it is worth it. Thanks for your suugestion, have a good week.
@jonatandor35 The html-component is Wix-unaware. When something like fullcall runs inside it, the two basically run on their own, “outside” wix. But to retrieve the data, I need a memberId (in http-get). http-get has no clue who the user is if you import wixBackendUsers, and this is correct. The call comes from outside Wix, so the http-get cannot possibly know which user (there can be more than 1 logged on).
@giri-zano but you can message your user ID to the Iframe isn’t it? Does fullcall has a custom field where you could store that information for future need?