Integrating Outlook Calendar to Website / Other - php

When the users add events to the online calendar they also can be added to the outlook calendar (synchronize). Obviously a site built using PHP can not integrate with desktop application directly, so I am looking alternative options.
Options I found:
Using PHP ICAL library creates an .ics file and the user can download it and install. Not the most user friendly way of doing it, might work.
Use SharePoint or exchange server- but have no previous experience working Microsoft technologies, so it not ideal.
Use Google Calendar and Zend Library (gdata), create online calendar and add events to that. Then using Google Calendar Sync tool the user can sync the online calendar to outlook. But the problem here is the all users need a gmail account to use the Sync tool, it not ideal when you have thousands of users on the site. Unless I create one global gmail account and create many calendars on that account, if that even possible.
Questions:
Are there any outlook plug-ins paid or free (ideally) that can achieve this?
Are there any web service/ APIs that can achieve this?
Any other ideas or solutions?

Office 365 comes with an REST API that can be used to read/write to calendars.
Here's some documentation on this. http://msdn.microsoft.com/office/office365/api/calendar-rest-operations
Alternatively, the EWS Managed API might be able to help you: http://msdn.microsoft.com/en-us/library/office/dd633696(v=exchg.80).aspx and
http://msdn.microsoft.com/en-us/library/office/dd633702(v=exchg.80).aspx

you could do this by having the outlook subscribe to the online calendar.
with phpicalendar you can have other clients subscribe to your calendars (here)
you may want to tweak the generated .ics file to include X-PUBLISHED-TTL - Recommended update interval for subscription to the calendar

To get the calender event follow these step:
Sign in to Calendar
On the toolbar, click Share
Select the calendar that you want to export/embed.
Click Get a link.
Under Show event details (click Create)
Note: If step number 5 is already performed, just skip it and click Link to event details
Copy the link that you needed and paste it on the desired program/website.

Use EWS exchange webservice to achieve this.
If it is a website with a no. of users u will need to create OU in exchange server and add a admin user who has read permissions to all accounts in the DL.
EWS exposes endpoints where in u can fetch the calendar mail add read and do all kind of operations.

Building off Rahul's idea but using a different approach - Microsoft provides something similar to a "RSS feed" that auto updates each time you GET the URL, except it's an feed of "ICS" event data:
Open up Outlook Web Access (OWA), e.g. if you are using a microsoft.com account the URL might be https://outlook.live.com/calendar/ (if you are using some other Microsoft 365 account the URL may be different)
On the top right, click the Settings icon
Click View all Outlook Settings
Click Calendar > Shared Calendars > and under Publish a calendar, select the calendar, then under Select permissions, choose as appropriate, then click Publish
It will give you HTML and ICS links. Copy the ICS link URL.
Use your favourite programming language/tool/software to periodically do a HTTPS request (using CURL or AJAX or some other HTTP fetch) using GET method to the URL you got in step 5. You will get back a bunch of calendar data in ICS format. Use this however you need. You may be able to find some pre-written code from elsewhere that parses ICS data for you, or you can manually create your own parser code if you have to.

Related

Add a link to email to allow users add events created on website to their calendar

I am trying to add a feature to my website that allows users to add an event created on the website to their calendar.
Basically the app allows users to schedule a meeting and after which the meeting is sent to the mail of members of the site. What I want to do is to add a link with the meeting details to the site so users can click on it to add the event to their calendar, majorly google and office 365 calendars.
I have tried initially with google calendar apis but I can't seem to figure out what to do with the apis given. I was going to try with schema (with reference from google calendar api) to allow users to execute click actions but I realized it wont allow me to add events to the calendar but could be used to trigger certain actions which is not what I need at the moment.
I am building the app with laravel and can send the markdown email alright just need to be able to allow users a click action to add events to their calendar.
Thanks in advance.
Lance, the action taken when an ics file is clicked upon depends on the users application and their personal setup. For example on my desktop I have it set that a .ics file will be opened in notepad++, whereas my iphone will have a more standard response. Then in Google for example it will automatically show events in google calendar that it has found in my gmail emails.
Other than sending the .ics in email, Some other things you can do:
offer a 'Add to Google Calendar' button with html link. More info here: Link to add to Google calendar. This prompts add to default calendar.
Example:
http://www.google.com/calendar/event?action=TEMPLATE&text=Friday%20Drinks&dates=20200501T080000Z/20200501T090000Z&location=407%20King%20St,%20Newtown%202042&trp=false&details=Regular%20Friday%20Night%20Get%20together%20at%20Earls%20Juke%20Joint
OR
offer a subscribable link on the website, unique to each user, of all meetings arranged. Once they have subscribed they will automatically see new ones. These would show in a separate calendar though.
I'm not aware of an Outlook 365 equivalent of the google 'TEMPLATE' - possibly they just go with the single event .ics.
You could use ics files, which are supported on most platforms.
A sample PHP Library is https://gist.github.com/jakebellacera/635416

Google Hangouts link in event descriptions

I use a PHP iCal library to import ics URLs from gmail. Everything worked fine until Friday (19th of January). Hangouts links are now included in the description of the events. I've read that there is a setting in the Google Admin console to disable automatic video calls but we can't ask each and everyone of our clients to go and disable this option. What is the easiest way to strip out these links? Keep in mind it's not only a URL. Also the text might appear in different languages.
This event has a Google Hangouts video call. Join: https://plus.google.com/hangouts/...
Does this have anything to do with the new Calendar app that Google launched recently?
Disabling the "Automatically add video calls to events created by a user" setting is the first step in solving this problem (per https://support.google.com/a/answer/6188027?hl=en).
However, it doesn't get rid of Hangout links in existing calendar events. I have multiple calendars going back over 15 years with thousands of events, and I noticed that even old events were filled with Hangouts links. Manually unchecking the Hangouts box in the Calendar web interface was not practical.
After searching far and wide, I found the Bulk Edit Calendar Events spreadsheet(?)/script that looked like it might be a good starting point to do this, but I was unable to get this to delete the Hangouts links (the script interface used there apparently does not allow modifying Hangouts on the calendar).
After contacting the author, he wrote a new script Remove Hangouts from events with a lower-level Calendar API (link is to my somewhat modified version), that removes only the Hangouts from each of the matching Calendar events. This needs to be imported into your Google space and run there (modifying the events from iCal doesn't get rid of the Hangout link), edited to set parameters, and authorized to run.
I'm leery of running unknown scripts with access to my Google account, but is short and simple enough to review that it is clearly doing what it should.
You have to ask users to disable it on their settings. It's what's stated in the support page:
Disable automatic video calls in Google
Calendar
By
default, video calls are automatically added to all Google Calendar
events.
Administrators can disable this setting. Users must then manually
click Add a video call every time a Google Calendar event is created.
To change the setting:
Sign in to the Google Admin console. Click Apps > G Suite > Calendar.
Click Sharing settings. Under Video Calls, uncheck Automatically add
video calls to events created by a user.

Google Calendar API: How to create a "read-only" / non-editable event?

I'm trying to copy some events from my web app into a user's Google Calendar, with the catch that the events in the Google Calendar should not be editable once they're there (in particular, it should not be possible to change their time). In other words, the Google Calendar is meant to be a read-only mirror of what's in my app. I haven't been able to find any properties in the v3 API call that would make this possible; can I do this? Thanks!
#Jim Unfortunately I think there is no features yet that support your request. Some work around is to embed Google calendar to your web app.
On a computer, open Google Calendar. You can only get the code to embed in your website from a computer, not the mobile app.
In the top right, click Settings settings gear button > Settings.
Open the Calendars tab.
Click the name of the calendar you want to embed.
In the Embed This Calendar section, copy the iframe code displayed.
Open your website editor, then paste this code where you want the calendar to display
Note : Your embedded calendar will only be visible to people you've shared it with. To allow all visitors to see your calendar, you'll need to make it public.
Another tip is to remove check the option for guest can modify on event.
You can get more information from this SO question.

Creating a Google Calendar remotely

I've been researching this question for the last few weeks and have had no success trying to connect to Google through OAuth1 OR 2.
I have a client that needs a separate Calendar for each of the homes they are building. On creation of a new home in the database, I want to create a calendar and save the Id of the created calendar.
What options do I have to do this?
It seems like the only way is to have the user get redirected to Google and login to add a calendar... I want to use a static Google account and simply create the calendar that way, without having the annoying "Login to google" screen.
Google api lets you to do whatever you need with a Calendar using their provided libraries. Let's take a look: Google Developer: Instantiate Google Calendar
This SO posts discusses that. Specifically pay attention to the line in the accepted answer where it is mentions the process for adding a new calendar is similar to adding an event.
SO: Google Calendar API Selecting and creating Calendars
I also came across this tutorial which may be helpful in terms of other actions on the calendar once it has been created.
IBM Developer Works: Integrate your PHP Application with Google Calendar

Which PHP calendar will suit my needs? Or build my own?

There are so many web based calendars out there that I'm not sure which will best suit my purposes.
I want to create an events calendar, which I suppose looks and functions in much the same way as google calendar. But users shouldn't need to sign up for a gmail account or a google account. Users of my social network website should be able to create events in the calendar and share it with other friends in their "friend network". In month, year or day views, you can mouse hover events to see a bubble dialog that lists events in detail. People need to pay a monthly fee to use my website (not sure if this prevents me from using google apps).
So is something like Google Calendar the way to go? Or are there other php/javascript calendars out there that already meet my needs? Or will it just save me more time to build my own?
Check out full calendar by arshaw.
This is a jQuery plugin that provides a full-sized, drag & drop calendar just like google calendar. one can also customize it easily.
Full Calenadar Link.
if you are going your own route then best to build on something already there and open. iCal is an open and available calendar spec and there are php implementations, but they would be extensible and you would following a standard.

Categories