我不清楚在网站上建立链接的确切格式,该链接会将单个事件添加到用户Google日历中.我看到eventbrite在这里完成了它,但我希望在正确的方向上有一些明确的规格或链接
我无法使用我的代码获取刷新令牌.我只能获得我的访问令牌,令牌类型等,我已经按照一些教程,比如access_type=offline输入我的登录URL:
echo "<a href='https://accounts.google.com/o/oauth2/auth?"
. "access_type=offline&client_id=123345555.apps.googleusercontent.com& "
. "scope=https://www.googleapis.com/auth/calendar+https://www.googleapis.com/auth/plus.me&response_type=code& "
. "redirect_uri=http://www.sample.com/sample.php&state=/profile'>Google</a>";
Run Code Online (Sandbox Code Playgroud)
以及我获取访问令牌的字段:
$fields=array(
'code'=> urlencode($authcode),
'client_id'=> urlencode($clientid),
'client_secret'=> urlencode($clientsecret),
'redirect_uri'=> urlencode($redirecturi),
'grant_type'=> 'authorization_code',
);
Run Code Online (Sandbox Code Playgroud)
但是我无法获得refresh_token,只有access_token,token_type,id_token和expires_in.
我正在为这家夜总会工作,目前正在为他们建立一个网站,他们有很多活动,他们的网站围绕各种活动建立了很多,今天他们为每个活动制作了一个facebook活动,但是拥有一个"添加到我的日历"按钮,将其添加到您的iCal或Google日历(甚至可能是Outlook).
我已经设法弄清楚如何制作日历源,但随后它将被添加为新的日历,唯一的好处是人们可以"订阅事件"但是每个事件都有一个日历是非常混乱的.所以我想知道如何实现一个功能,让他们轻松地将它添加到他们的主日历.想想像mailto:链接,但是如果可能的话,可以用于日历.
此外,如果有人知道是否可以自动将Facebook中的事件导入WordPress或将事件从WordPress导出到Facebook,那将是很好的,但这并不是那么重要.
我们可以使用这个链接来add a new event对Google Calendar通过parameters
https://www.google.com/calendar/render?
action=TEMPLATE&
text=EventName&
dates=20131206T050000Z/20131208T060000Z
&location=EventLocation&
sprop=name:Name&
sprop=website:EventWebite&
details=EventDetail&
sf=true&
output=xml
Run Code Online (Sandbox Code Playgroud)
但我找不到有关这些参数的任何文档.
有谁知道它在哪里?
是否有用于在 Google Meet 中创建新会议的 API?https://meet.google.com/Create new meeting 上有一个按钮,我想使用 API 做类似的事情
我知道可以使用 Google 日历 API 创建会议,但我正在寻找直接用于 Google Meet 的 API,而无需创建日历事件。
[编辑] 它不能解决我的问题,但也许会帮助别人。还可以选择使用https://meet.google.com/lookup/[custom-meeting-name]生成会议,但您需要拥有 Google Workspace(前 GSuite)
我要做的是:使用javascript从我的网站向Google日历添加活动.
我不能做的:找一个好的教程/浏览/示例google calendar api.我已经能够在v1和v2 api之间来回找到所有文档,或者v3 api似乎不是基于客户端的.
对于那些好奇的网站,我正在开发这个网站:http: //infohost.nmt.edu/~bbean/banweb/index.php
我正在尝试在IOS应用中授权用户使用Google日历API.我正在使用Google的OAuth2功能对用户进行身份验证.将打开授权页面,其中包含描述403错误:
此用户代理不允许向Google发出OAuth授权请求,因为它被归类为嵌入式用户代理(也称为Web视图).根据我们的政策,只允许浏览器向Google发出授权请求.我们为本机应用提供了几个库和示例,以便在浏览器中执行授权请求.
我按照此链接中提到的相同步骤操作:https://developers.google.com/google-apps/calendar/quickstart/ios
不要看我的代码,最好查看以下链接:https: //developers.google.com/google-apps/calendar/quickstart/ios, 因为我在我的应用程序中复制粘贴相同的内容.
下面是我的clientId和keyChainItemName:
static NSString *const kKeychainItemName = @"Google Calendar API";
static NSString *const kClientID = @"954370342601-sgl8k0jrbqdeagea9v6vfu3tspte96ci.apps.googleusercontent.com";
Run Code Online (Sandbox Code Playgroud) 我正在使用G Suite的服务帐户进行完整的域名授权.我有一个只读访问Google日历的脚本.该脚本工作正常,但在"构建"服务时抛出错误(在后台线程上?).这是代码:
from oauth2client.service_account import ServiceAccountCredentials
from httplib2 import Http
import urllib
import requests
from apiclient.discovery import build
cal_id = "my_calendar_id@group.calendar.google.com"
scopes = ['https://www.googleapis.com/auth/calendar.readonly']
credentials = ServiceAccountCredentials.from_json_keyfile_name('my_cal_key.json', scopes=scopes)
delegated_credentials = credentials.create_delegated('me@mydomain.com')
http_auth = delegated_credentials.authorize(Http())
# This is the line that throws the error
cal_service = build('calendar','v3',http=http_auth)
#Then everything continues to work normally
request = cal_service.events().list(calendarId=cal_id)
response = request.execute()
# etc...
Run Code Online (Sandbox Code Playgroud)
抛出的错误是:
WARNING:googleapiclient.discovery_cache:file_cache is unavailable when using oauth2client >= 4.0.0
Traceback (most recent call last):
File "/Users/myuseraccount/anaconda3/lib/python3.5/site-packages/googleapiclient/discovery_cache/__init__.py", line 36, in autodetect …Run Code Online (Sandbox Code Playgroud) 此代码来自谷歌日历.
var dateString = (startJSDate.getMonth() + 1) + "/" + startJSDate.getDate();
if (!startDateTime.isDateOnly()) {
dateString += " @ " + startJSDate.getHours() + ":" +
padNumber(startJSDate.getMinutes());
}
dateString = "<span>" +dateString + "</span>";
var li = document.createElement('li');
Run Code Online (Sandbox Code Playgroud)
我需要在变量dateString周围添加一个span标记,如上所述添加它们会在页面上返回"1234"作为文本.
字符串呈现如下:
li.appendChild(document.createTextNode(' - ' + dateString));
Run Code Online (Sandbox Code Playgroud) 我没有看到任何明显的方法从这里的API文档将ICS文件导入Google日历:
http://code.google.com/apis/calendar/developers_guide_protocol.html
而且我非常希望不必自己解析它们只是为了将约会发送到GCal.我正在寻找一个程序化的解决方案,而不是像Thunderbird,Outlook等的导入插件.用于进行ICS解析的第三方API在任何语言中都是可以接受的.有任何想法吗?
calendar ×2
html ×2
icalendar ×2
access-token ×1
document ×1
gcal ×1
gdata ×1
google-api ×1
google-oauth ×1
hangout ×1
hangouts-api ×1
ios ×1
iphone ×1
javascript ×1
python ×1
token ×1
web ×1