lorisleiva / blog-google-calendar Goto Github PK
View Code? Open in Web Editor NEW๐ Google Calendar Integration
Home Page: http://lorisleiva.com/google-calendar-part-1-integration/
๐ Google Calendar Integration
Home Page: http://lorisleiva.com/google-calendar-part-1-integration/
Has anyone got this working since Jan 15, 2020, if yes what did you use in replacement of Google Plus?
class GoogleAccountController ---- around line 44 $account = $google->service('Plus')->people->get('me');
throws a Legacy error.
Thanks in advance!
Hi, Thank you for your awesome work.
I am having an issue with Part 2 of your tutorial/files
Call to a member function synchronize() on null {"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to a member function synchronize() on null at /var/www/xxxxxxxx/app/Synchronization.php:22)
Is there something which I missed. I did not find related to create new event in google calendar from Google API.
If the google event name ($googleEvent->summary) is empty it causes an exception and the sync fails. I added a turnery, maybe there is a better option, but this works for me.
SynchronizeGoogleEvents.php
'name' => $googleEvent->summary ? $googleEvent->summary : 'Event',
Issue appear on this line:
'name' => head($account->email)->value,
public function store(Request $request, Google $google)
{
if (! $request->has('code')) {
return redirect($google->createAuthUrl());
}
// Use the given code to authenticate the user.
$google->authenticate($request->get('code'));
// Make a call to the Google+ API to get more information on the account.
$account = $google->service('Oauth2')->userinfo->get();
auth()->user()->googleAccounts()->updateOrCreate(
[
// Map the account's id to the `google_id`.
'google_id' => $account->id,
],
[
// Use the first email address as the Google account's name.
'name' => head($account->email)->value,
// Last but not least, save the access token for later use.
'token' => $google->getAccessToken(),
]
);
return redirect()->route('google.index');
}
I think this project is very well made and I was going to use it in the current product I am working on but... I am strongly against cannibalizing people's code.
I would like to suggest that you refactor this into a package so other people can extend it properly at same time that the credits for your work are preserved.
Thanks and congrats again on this tutorial.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.