无法通过vimeo中付费帐户的API检索vimeo视频详细信息

时间:2015-07-31 06:01:48

标签: video vimeo vimeo-api

我正在尝试通过vimeo api为付费帐户获取特定用户的vimeo视频详细信息。

这是我用过的代码,这是我使用Vimeo 1.2.3(https://github.com/vimeo/vimeo.php/releases

的vimeo类的版本
    Configuration conf = new Configuration();
    Job job = Job.getInstance(conf, "Job1");
    job.setJarByClass(Simpletask.class);
    job.setMapperClass(TokenizerMapper.class);
    job.setCombinerClass(IntSumReducer.class);
    job.setReducerClass(IntSumReducer.class);
    job.setOutputKeyClass(IntWritable.class);
    job.setOutputValueClass(Text.class);
    FileInputFormat.addInputPath(job, new Path(args[0]));
    FileOutputFormat.setOutputPath(job, new Path(args[1]));

    //AND THEN I WAIT THIS JOB TO COMPLETE.
    boolean complete = job.waitForCompletion(true);

    //I START A NEW JOB, BUT WHY IS IT NOT RUNNING?
    Configuration conf = new Configuration();
    Job job2 = Job.getInstance(conf, "Job2");
    job2.setJarByClass(Simpletask.class);
    job2.setMapperClass(TokenizerMapper.class);
    job2.setCombinerClass(IntSumReducer.class);
    job2.setReducerClass(IntSumReducer.class);
    job2.setOutputKeyClass(IntWritable.class);
    job2.setOutputValueClass(Text.class);
    FileInputFormat.addInputPath(job2, new Path(args[0]));
    FileOutputFormat.setOutputPath(job2, new Path(args[2]));

这里的问题是,对于一个普通的测试帐户,它获取$ response数组值,就好像我尝试了vimeo的付费帐户凭据详细信息,它为$ response发送了这个错误

    $client_id = 'xxxxxxxxxxxxxxxxx';

    $client_secret ='xxxxxxxxx';

    $access_token = 'xxxxxx'; 

    $lib = new Vimeo($client_id, $client_secret);   
    $lib->setToken($access_token);  
    $response = $lib->request('/me/videos', array('per_page' => 2), 'GET');

    $videos = $response['body']['data'];
    print_r($response);exit;

1 个答案:

答案 0 :(得分:0)

如果用户拥有私人帐户,您需要成为该用户才能查看信息。 Vimeo可以通过查找用户帐户并将其与您的令牌进行比较,在此提供更直接的支持。

https://vimeo.com/help/contact

与他们联系