I'm trying to get a public url that can be accessed anywhere for streaming. I can get the downloadUrl
, but doing the same for exportLinks
results in null values. The code for this is below, though I don't know what my problem is.
NSError *error;
NSString *exportURLStr;
GTLDriveFile *file = [driveFiles objectAtIndex:indexPath.row];
exportURLStr = [NSString stringWithFormat:@"%@",file.exportLinks];
NSURL *url = [NSURL URLWithString:exportURLStr];
NSString *temp1= [NSString stringWithFormat:@"%@",url];
// NSLog of temp1 is Null
// I tried with file.WebContentLink but getting 404 Error
This is only a snippet of the code, so if I need to show more, just ask.
From google-api-objectivec-client go to DriveSampleWindowController.m,
check the method called - (void)downloadFormatSelected:(NSMenuItem *)menuItem
where its shown cleary how to format the exportLinks
.
NSLog(@"%@",[file.exportLinks JSONValueForKey:@"urtitlekey"]);
This is what you wanted.Hope it helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With