Youtube: Display upcoming Live events on web page - php

I have a Youtube Live Events account and I'm using Google Hangouts in Google Plus to create Upcoming Live Events. Is it possible at all to somehow relay this upcoming events list to my webpage? My webpage uses PHP 4.3.8 (I know it is a bit outdated...).
I just want the user to create the events and given what they create on Google Hangouts have my page query and show a list and link of these.

You can list your live events using the YouTube LiveStreaming API.
Here's a sample PHP code for this.
https://github.com/youtube/api-samples/blob/master/php/list_broadcasts.php

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

Is it possible to add get all the events from a google calendar?

Is it possible to add get all the events from a google calendar? I can create a calendar view exactly from google calendar by embedding to my website (I'm using php), but I want only to get title, details, and when of all the events only. And put it on a list on my website.
I want that if I add a event on my google calendar, the list from my website will also be updated.
I only need title, description or details and date of events from google calendar.
Every time you render the website, you can use the RSS feed from the google calendar/the JSON API to the google calendar to fetch the data you need.
By doing this dynamically you can make sure any new events are replicated.

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

Integrating Outlook Calendar to Website / Other

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.

how can I embed google contacts or calendar in to my php webpage

I want either the ability to search contacts from the website or display some
It would be nice if you studied the Google APIs, however, you can use classes that make the integration for you.
To create an show events in google calendar direct from your page.
http://www.phpclasses.org/package/5729-PHP-Create-events-in-a-Google-calendar.html
To import and manage google contacts.
http://www.phpclasses.org/package/5043-PHP-Import-contacts-from-Gmail.html

Categories