我有一个很长的详细问题,关于如何获取特定日历的事件提要,但在我发布之前想到了(我认为)解决方案.然而,即使有了解决方案,我仍然想知道我对这个过程缺少什么.要获取单个日历的事件订阅源(或搜索该订阅源),请执行以下操作:
为什么我要操纵ID?似乎Zend_Gdata的文档遍布Google和Zend的网站.我没有找到一个关于getCalendarListFeed()的可用属性的好参考,所以也许我应该抓住ID以外的东西?
好像有有更直接的方式-我缺少什么吗?
我正在将Google日历与我的应用程序同步(我将事件存储在数据库中).更新事件后,我可以通过在"更新"订单上对事件订阅源进行排序,轻松找到上次更新.但是,如果删除/删除了某个活动,我该如何从Feed中跟踪此更新?
我正在写一个网络应用程序来自动搜索谷歌的嗡嗡声.
我写了一个C#库来管理"Oauth dance"并且它工作正常,我可以得到oauth_token和oauth_token_secret.
我使用www.googlecodesamples.com/oauth_playground/来验证我的oauth_token和oauth_token_secret,它运行正常.我使用GET和https://www.googleapis.com/buzz/v1/activities/@me/@self 对其进行测试以获取用户的流,它可以正常工作.
但现在
我正在尝试使用我的C#库做同样的事情,但我总是得到这个错误:
<?xml version="1.0" encoding="UTF-8"?>
<errors xmlns="http://schemas.google.com/g/2005">
<error>
<domain>GData</domain>
<code>invalid</code>
<location type="header">Authorization</location>
<internalReason>Unknown authorization header</internalReason>
</error>
</errors>
Run Code Online (Sandbox Code Playgroud)
我的请求标题与操场上的标题相同.
Accept: */*
Content-Type: application/atom+xml
Authorization: OAuth oauth_version="1.0", oauth_nonce="9216320",
oauth_timestamp="1283430867", oauth_consumer_key="www.mysite.com",
oauth_token="1%2FZodlNmPP96GT11vYaWA0y6QoqKLqNqZ8bNmxknZZZc",
oauth_signature_method="HMAC-SHA1",
oauth_signature="Tuu82feKNWa4CxoDUyvtIEVODRA%3D"
GData-Version: 2.0
Run Code Online (Sandbox Code Playgroud)
这是C#代码:
string headAuth = "Authorization: OAuth oauth_version=\"1.0\", oauth_nonce=\"9216320\", oauth_timestamp=\"1283430867\",
oauth_consumer_key=\"www.mysite.com\", oauth_token=
\"1%2FZodlNmPP96GT11vYaWA0y6QoqKLqNqZ8bNmxknZZZc\",
oauth_signature_method=\"HMAC-SHA1\", oauth_signature=
\"Tuu82feKNWa4CxoDUyvtIEVODRA%3D\"";
HttpWebRequest req1 =(HttpWebRequest)HttpWebRequest.Create("https://www.googleapis.com/buzz/v1/activities/@me/@self");
req1.Method = "GET";
req1.Accept = "*/*";
req1.ContentType = "application/atom+xml";
req1.Headers.Add("Authorization", headAuth);
req1.Headers.Add("GData-Version", "2.0");
try
{
HttpWebResponse response1 =(HttpWebResponse)req1.GetResponse();
using (var sr = new …Run Code Online (Sandbox Code Playgroud) 我正在尝试在youtube中显示用户的收藏视频列表.所以基本上在获取视频源之前我需要登录才能获得身份验证令牌.我遇到了一些饼干的问题.这是我的日志记录代码:
public static String loginUser(String username, String password){
Log.i("Utils", "Start logging user");
// Create a new HttpClient and Post Header
DefaultHttpClient httpclient = new DefaultHttpClient();
CookieStore cookieStore = new BasicCookieStore();
HttpContext localContext = new BasicHttpContext();
// Bind custom cookie store to the local context
localContext.setAttribute(ClientContext.COOKIE_STORE, cookieStore);
HttpPost httppost = new HttpPost("https://www.google.com/youtube/accounts/ClientLogin");
httppost.addHeader("Content-Type","application/x-www-form-urlencoded");
String result = "";
try {
// Add your data
StringEntity tmp =
new StringEntity("Email="+ username +"&Passwd="+ password +"&service=youtube&source=speed bit", "UTF-8");
httppost.setEntity(tmp);
// Execute HTTP Post Request
HttpResponse …Run Code Online (Sandbox Code Playgroud) 所以,这是获取youtube用户的公共播放列表的代码:
function getyoutubeplaylists($userName) {
$yt = connectyoutube();
$yt->setMajorProtocolVersion(2);
$playlistListFeed = $yt->getPlaylistListFeed($userName);
foreach ($playlistListFeed as $playlistListEntry) {
$playlist['title'] = $playlistListEntry->title->text;
$playlist['id'] = $playlistListEntry->getPlaylistID();
$playlists[] = $playlist;
$playlistVideoFeed = $yt->getPlaylistVideoFeed($playlistListEntry->getPlaylistVideoFeedUrl());
foreach ($playlistVideoFeed as $videoEntry) {
$playlist_assignment['youtube_id'] = substr($videoEntry->getVideoWatchPageUrl(),31,11);
$playlist_assignment['id'] = $playlist['id'];
$playlist_assignments[] = $playlist_assignment;
}
}
$everything['playlists'] = $playlists;
$everything['playlist_assignments'] = $playlist_assignments;
return $everything;
}
Run Code Online (Sandbox Code Playgroud)
问题是,这只会得到第一页或结果.关于如何使用Zend Gdata检索下一页结果的任何想法?
原始gdata XML显示了所需的URL:
<link rel="self" type="application/atom+xml" href="http://gdata.youtube.com/feeds/api/users/pennstate/playlists?start-index=1&max-results=25"/>
<link rel="next" type="application/atom+xml" href="http://gdata.youtube.com/feeds/api/users/pennstate/playlists?start-index=26&max-results=25"/>
Run Code Online (Sandbox Code Playgroud)
但是,getPlaylistListFeed似乎没有任何参数来指定"start-index"或"max-results".
我有一个GDATA链接,我想在我的应用程序中使用.此链接包含播放列表,我希望该播放列表显示在ListView.然后,用户将选择他/她想要的视频,然后可以使用本地Youtube应用程序在应用程序旁边播放.
请指出一个直观的教程.我知道YouTube API页面包含所有信息,但我可以做出正面或反面.
关于如何使用支持的API将javascript客户端(非小工具)写入私有Google电子表格,我感到非常困惑?我没有遇到OAuth2 Drive API客户端的问题,但是没有电子表格支持!
https://developers.google.com/apis-explorer
此问题粗略地要求电子表格API显示在该页面上:
http://code.google.com/p/google-api-javascript-client/issues/detail?id=37
我可能遗漏了一些明显的东西,所以谢谢你的善意帮助我......
更新:
哇,这是踢我的背后!因此,我将尝试从Oauth2工作流中获取access_token,然后设置gdata API Authorization标头,如下所示:
service = new google.gdata.client.GoogleService('testapp');
service.setHeaders({'Authorization': 'Bearer '+ access_token});
Run Code Online (Sandbox Code Playgroud)
不幸的是,chrome控制台显示当我执行类似操作时,此标头实际上并未发送到Google
service.getFeed(url, cb, eb);
Run Code Online (Sandbox Code Playgroud)
Uffff!
我正在通过我的应用在YouTube上上传视频.我已按照以下步骤操作http://urinieto.com/2010/10/upload-videos-to-youtube-with-iphone-custom-app/
但是我在该示例代码中找到了19个未找到库类的错误.
在GDataOAuthViewControllerTouch.m文件中,获取GDataOAuthAuthentication类的"预期类型"错误.这是快照

我也尝试了这些步骤http://hoishing.wordpress.com/2011/08/23/gdata-objective-c-client-setup-in-xcode-4/,但是如果我使用gdata客户端库提供的话通过urinieto示例代码而不是获取错误.
请帮我
我有工作代码直到昨天和今天我看到异常,com.google.gdata.util.ResourceNotFoundException 同时从我的gae代码阅读谷歌文档如下.请注意,最后一行是抛出此异常.
DocsService client = new DocsService("sakshum-YourAppName-v1");
client.setOAuthCredentials(oauthParameters,
new OAuthHmacSha1Signer());
URL feedUrl = new URL(
"https://docs.google.com/feeds/default/private/full/");
DocumentQuery dquery = new DocumentQuery(feedUrl);
dquery.setTitleQuery(title);
dquery.setTitleExact(true);
dquery.setMaxResults(10);
DocumentListFeed resultFeed = client.getFeed(dquery,
DocumentListFeed.class);
log.info("feed size:" + resultFeed.getEntries().size());
if (resultFeed.getEntries().size() != 1) {
log.info("More than one document is found with same title.");
return null;
}
emailBody = new StringBuffer("");
for (DocumentListEntry entry : resultFeed.getEntries()) {
String docId = entry.getDocId();
String docType = entry.getType();
log.info("Getting doc from url with docId:" + docId
+ " docType:" …Run Code Online (Sandbox Code Playgroud) 我正在使用Google JavaScript API在网络应用中获取谷歌联系人,我想要检索他们的图片.
我正在做这样的事情(大大简化):
var token; // let's admit this is available already
function getPhotoUrl(entry, cb) {
var link = entry.link.filter(function(link) {
return link.type.indexOf("image") === 0;
}).shift();
if (!link)
return cb(null);
var request = new XMLHttpRequest();
request.open("GET", link.href + "?v=3.0&access_token=" + token, true);
request.responseType = "blob";
request.onload = cb;
request.send();
}
function onContactsLoad(responseText) {
var data = JSON.parse(responseText);
(data.feed.entry || []).forEach(function(entry) {
getPhotoUrl(e, function(a, b, c) {
console.log("pic", a, b, c);
});
});
}
Run Code Online (Sandbox Code Playgroud)
但是我在Chrome和Firefox中都遇到了这个错误:
跨源请求封锁:同源策略不允许读取远程资源在https://www.google.com/m8/feeds/photos/media/<user_email?>/<some_contact_id> V = …
oauth gdata-api google-data-api google-shared-contacts google-oauth
gdata-api ×10
gdata ×3
youtube ×3
android ×2
php ×2
youtube-api ×2
c# ×1
google-oauth ×1
ios ×1
java ×1
javascript ×1
listview ×1
login ×1
oauth ×1
playlist ×1
zend-gdata ×1