• Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

Java Implement api

Hello all,

I am struggling with the following;

I am using a html calendar on a website... I want the calendar to display the appointments from a google calendar. So when i add something in Google calendar it will be shown there. I think i have to use java and have a script connect to the google calendar api? Anyone who can help me get started with this? I dont have any java skills (yet) and when i google it there is too much different information..
 
Thanks for the reply, maybe it's a stupid question but why do i have to make the directory? I am building the site in xampp so i allready have a "webserver". And when I put this site online what do i do then with the directory that i created locally? Ill go at it for now because i want to understand this but if you could explain the above i would appreciate it :).
 
Okay, so here's what i did.

I tried to set it up in dreamweaver instead of python. Then i followed the guide you provided. When i look at the output of the code i get the following error:

Code:
{
  "error": {
    "errors": [
      {
        "domain": "usageLimits",
        "reason": "keyInvalid",
        "message": "Bad Request"
      }
    ],
    "code": 400,
    "message": "Bad Request"
  }
}
 
It looks like you're creating a website using XAMPP on your local machine, and once you've created an HTML web page you'll upload this to a web server that's hosting on the internet. I guess for now you're looking to show a calendar month and then populate that with events that are in your google calendar.

There may be a quick and maybe easy solution: embed a google calendar into your web page: https://support.google.com/calendar/answer/41207?hl=en

However, if you're looking to control what information (like how much ahead to retrieve calendar information for) you'll want to query the Google Calendar API, but that will also require you to interpret the data coming from Google and format it in a way to display on your page.

Before I go any further (you responded while I was typing this), would embedding a Google Calendar suit your needs? I think there may be a lot to explain.
 
I'll try to explain why i have chosen this way.

I have embedded a google calendar on the site at first. The problem with this is that i can't seem to style it properly using css. Also the embedded calender is published as a page (in joomla) so i had to workaround to make the calender component show as a module. This worked but the style of the calendar isn't what i want. So then i tried linking it to a html calender which i couldn't get to work.
For a future project i want to link an API to an appointment form (so that the dates that can be chosen in a form are only the available ones, once an appointment is made the date should be removed from the form). That's why i thought it would be good to learn how to fix my calendar problem with the API of google. Not just for the future project but also to make some nice calenders which can be easily edited by making appointments in the google calendar.
At least i think it would be possible for someone to make an edit in the google calender and it will be shown on the site as well.
I hope i explained clearly :Rofl::x3:
 
I tried implementing the code to my site...
After refreshing i get this...

Code:
{ "error": "idpiframe_initialization_failed", "details": "Not a valid origin for the client: http://villa-valencia.vulperia.synology.me has not been whitelisted for client ID <111283467407-ia17tmh2tslj37be3r1ak8p2784ut37n.apps.googleusercontent.com>. Please go to https://console.developers.google.com/ and whitelist this origin for your project's client ID." }

I tried adding the domain in google dev console... am i missing something?
 
Yeah, thats what i tried to do...
I have put a certificate to the site (as it runs on my nas) because i found on google that it could be fixed by https... didnt work for me i guess... I tried a lot of different things... now on the website the error is gone but of only displays the header of the code... the rest is blank... i might be kinda noobish but could it be that i need to put some code somewhere so it displays? At a certain point i did get the confirmation of oauth in a pop up...
 

New Threads

Latest posts

Buy us a coffee!

300x250
Top Bottom