0
Picasa 웹 앨범에서 사진을 표시해야하는 응용 프로그램을 개발 중입니다. 그것에 대해 검색했습니다. 나는 다음 링크를 가지고있다. https://code.google.com/p/gdata-objectivec-client/Picasa 앨범에서 사진을 가져 오는 방법은 무엇입니까?
나는 GData를 다운로드했으며 필요한 모든 폴더를 xcode에 포함 시켰습니다.
내가 작성한 코드는 여기에 있습니다.
- (void) loadPhotoGallery{
username = @"xyz";
password = @"abc";
GDataServiceGooglePhotos *photosService;
photosService = [self photoService];
NSURL *url = [GDataServiceGooglePhotos photoFeedURLForUserID:@"user" albumID:@"ablumID" albumName:nil photoID:nil kind:nil access:nil];
GDataQueryGooglePhotos *introspectQuery;
introspectQuery = [GDataQueryGooglePhotos photoQueryWithFeedURL:url];
[introspectQuery setResultFormat:kGDataQueryResultServiceDocument];
GDataServiceTicket *ticket;
ticket = [photosService fetchFeedWithQuery:introspectQuery delegate:self didFinishSelector:@selector(introspectTicket:finishedWithServiceDocument:error:)];
}
- (void)introspectTicket:(GDataServiceTicket *)ticket
finishedWithServiceDocument:(GDataAtomServiceDocument *)serviceDoc
error:(NSError *)error {
if (error == nil) {
GDataAtomCollection *collection = [[serviceDoc primaryWorkspace] primaryCollection];
NSArray *theMIMETypes = [collection serviceAcceptStrings];
}
}
-(GDataServiceGooglePhotos *)photoService{
static GDataServiceGooglePhotos *service = nil;
username = @"xyz";
password = @"abc";
if (!service) {
service = [[GDataServiceGooglePhotos alloc] init];
[service setShouldCacheDatedData:YES];
[service setServiceShouldFollowNextLinks:YES];
[service setIsServiceRetryEnabled:YES];
}
if ([username length] > 0 && [password length] > 0) {
[service setUserCredentialsWithUsername:username
password:password];
} else {
// fetch unauthenticated
[service setUserCredentialsWithUsername:nil
password:nil];
}
return service;
}
하지만이 코드는 매우 혼란 스럽습니다.
누구든지 도움을 줄 수 있습니다. 사진 가져 오기 코드를 시작하는 방법?
미리 감사드립니다.