I'm a little bit confused how to delete a video with the new API from Vimeo. I'm succeeded to create an application that uploads with the post function $vimeo->request().
But I have no clue how to delete a video.
The Vimeo API Docs are good but I need some example or a hint. I'm developing in PHP right now so if someone could help me it would be awesome.
To delete a video, you need the Video URI (It will look something like /videos/12345).
Then you make an authenticated DELETE request against that URI. In the PHP library, it would look like this:
$vimeo = new Vimeo(YOUR_APPLICATION_ID, YOUR_APPLICATION_SECRET, ACCESS_TOKEN);
$vimeo->request($uri, array(), 'DELETE');
Related
I have a project that involves live events which are hosted using Vimeo.
I know we can grab the videos on Vimeo along with their details using:
$response = $vimeo->request('/me/videos', array('name' => 'video_name'), 'GET');
This works great and returns all our videos, both videos and future events.
However, I can not find the date that the event is set to take place within the payload returned by Vimeo. It returns the following dates, none of which is the date the event will take place (which is 3 months from now):
"created_time" => "2019-12-10T11:03:13+00:00"
"modified_time" => "2019-12-10T12:08:11+00:00"
"release_time" => "2019-12-10T11:03:13+00:00"
The date the event is set to take place is included within the iframe that is returned in the payload, however it does not include the year and therefore it is essentially useless for what we need.
I was wondering if anyone with more experience using the Vimeo API would be able to point me in the right direction with this?
Thanks in advance.
The public Vimeo API doesn't currently support Vimeo Live events, so the API won't return any metadata specific to Live events, such as the scheduled broadcast date/time.
I used to get links for video streams from google drive file like this:
https://r10---sn-3c27ln7s.c.docs.google.com/videoplayback?requiressl=yes&id=74dd098b62525d54&itag=18&source=webdrive&app=docs&ip=188.163.98.118&ipbits=8&expire=1442346818&sparams=requiressl,id,itag,source,ip,ipbits,expire&signature=397C18F3AE6C610474D08C488D5AF100ED216BFA.F0054EA555A89D47246A4D7940737FE31A4F3EF&key=ck2&mm=30&mn=sn-3c27ln7s&ms=nxu&mt=1442343170&mv=m&pl=18&type=video/mp4
but now they've became IP-tied and dont work.
Is there a way to get links to a google drive video file like this:
https://redirector.googlevideo.com/videoplayback?requiressl=yes&id=7190d1270ce7b390&itag=22&source=webdrive&cmo=secure_transport=yes&ip=0.0.0.0&ipbits=0&expire=1442433811&sparams=requiressl,id,itag,source,ip,ipbits,expire&signature=3A6A4C31E6E72FD2476E70D5C1DC15034E246B0.E62179AC670E5B501EF27BDF81BFC4DF5EC9159&key=ck2
You can use the following link to embed videos and images. Just give a try.
https://drive.google.com/uc?id={fileID}
If your video files are above 100mb then you can use this :
https://www.googleapis.com/drive/v3/files/{file id}?alt=media&key={drive api key}
Or you can use these tool to stream video directly :
https://speedynet.vercel.app/embed.html
https://dashplay.netlify.app/embed.html
You can get your drive api key here :
https://console.cloud.google.com/apis/dashboard
Try this
https://drive.google.com/uc?export=download&id=<YOUR-ID-HERE>
Beware this.
If you call with Method GET - You get a file
If you call with Method POST - You get a JSON return with something like this
{
"disposition": "SCAN_CLEAN",
"downloadUrl": "https://doc-0o-2g-docs.googleusercontent.com/docs/securescxxxx/xxxxx/xxxxx?e=download",
"fileName": "VID_20170508_085207.mp4",
"scanResult": "OK",
"sizeBytes": 31851745
}
Use https://docs.google.com/e/yourdomain.com/get_video_info?docid={doc_id}.
Change yourdomain.com to your domain gsuite.
Fetch the api using the url with your access_token. If not using access token maybe you will get 403 forbidden access.
You can use the following link to get the video stream from google drive:
http://api.getlinkdrive.com/getlink?url={google_drive_url}
I have had this problem for some time now and I have seen others have it as well. It has to deal with posting your custom objects that you create in Open Graph to post with your application. I am having this problem primarily on all platforms, but right now let's say I am using Android. If someone has accomplished this in C# or on IOS or even in PHP please post your answer.
An Example:
I have an object that posts a meal to Facebook. Let's say its properties are the following.
mealName = "Lunch"
mealType = "Vegetarian"
mealLocation = "Somewheresville, OH"
Now I have another object in my Open Graph and it is called DailyFood. It has properties such as the following.
day = "12/01/2012"
meal = "MyCustomMeal" // This references a meal object
Now when I go to post that I try to do the following in Java.
//Build Meal
JSONObject mealData = new JSONObject();
mealData.put("mealName", "Lunch");
mealData.put("mealType", "Vegetarian");
mealData.put("mealLocation", "Somewheresville, OH");
Bundle params = new Bundle();
params.putString("day", "12/01/2012");
params.putString("meal", mealData.ToString());
AsyncFacebookRunner request = new AsyncFacebookRunner(facebook);
This is where I generate the following error code.
{"error":
{"message":"(#3503) is an invalid value for property
\"meal\" with type \"Reference\"","type":"OAuthException","code":3503}}
Now I know that it says OAuthException but I am able to post feeds to Facebook with this app just fine. If anyone else has experienced this error on any platform and has found a solution please post it here.
Thanks!
So the answer to this question is that you actually need a website available for your app to be able to reference what its posting to Facebook. In the docs, I at least, wasn't able to find out where this was noted.
according to this official video you must have the web application to post the action using open graph,no matter in which platform we are working android,ios etc
as it fetches the meta tags and properties from the web url only which works as refrence.
I'm having trouble with posting an image from my canvas application to the user's albums. According to the Facebook docs:
In order to publish a photo to a user’s album, you must have the publish_stream permission. With that granted, you can upload a photo by issuing an HTTP POST request with the photo content and an optional description to one these to Graph API connections:
https://graph.facebook.com/USER_ID/photos - The photo will be published to an album created for your app. We automatically create an album for your app if it does not already exist. All photos uploaded this way will then be added to this same album.
https://graph.facebook.com/ALBUM_ID/photos - The photo will be published to a specific, existing photo album, represented by the ALBUM_ID.
So, going by point one, if I upload an image like this...
Facebook.api("me/photos",imagePostCallback,{message:"",image:myImageBitmap,fileName:''},URLRequestMethod.POST);
...then I can expect it to place my image in an album named for my app, which it will create if necessary?
Not so.
What actually happens when the album doesn't exist is that the uploaded image is pushed into any other handy albums that exist, which are usually for (and created by) other applications. This is a bit of a pain.
So far I've tried the following:
Disabling sandbox mode. I had thought that the app might be unable to create new albums because it was in sandbox mode, however disabling sandbox mode made no difference and I can create albums directly with it enabled.
Checking for the existence of my album and creating it if necessary. I can check for my album and create it if it does not exist, but I cannot then upload an image because the POST call to Facebook.api to upload the image will fail if it is not called as a direct result of a user interaction.
And so now I'm a bit stumped. Obviously I can't have the possibility of my app posting images to a competitors album, but at the moment the only alternative I can see will involve effectively making the user submit their image twice if an album has to be created. Any ideas?
I'm guessing you need the access_token in your params :) When posting something on a user's facebook, you always need this one (not always necessary when getting information). The way to get the accesstoken is shown below :)
public function post():void
{
var _params:Object = new Object();
_params.access_token = Facebook.getSession().accessToken;
_params.message = "";
_params.image = myImageBitmap;
_params.fileName = "";
Facebook.api("me/photos", imagePostCallback, _params, URLRequestMethod.POST);
}
also make sure that you have the right permissions when asking for permissions with your app.
EDIT
Ok, so I've missed your edit a bit there ;) it should be possible to create your own album. Take a look at this php-code for graph api. The code should also be able to be parsed to AS3.
http://developers.facebook.com/blog/post/498/
EDIT2
ok, i've done some more digging (seemed interesting to know). This should actually work when using graph api.
FB.api('/me/albums', albumCreateCallback, {name: 'name of the album', message: 'description of the album'}, URLRequestMethod.POST);
When you then call for another api call to upload your image in the albumCreateCallback, it should work and upload your image (according to what i've found).
Need to find a way to send a delete method from Flash Player (Flex). Currently it's not done by default (except for from AIR), but I am sure someone has augmented the URLRequestHeader to get it to work properly.
I've tried this, it isn't working:
request.requestHeaders = [new URLRequestHeader("X-HTTP-Method-Override",
DELETE_REQUEST_METHOD)];
Due to limitations in NPAPI this is not currently possible. The only work-around in Flash Player is to use the as3httpclientlib that builds a new HTTP client through Socket instead of through the browser networking API.
The docs for HTTPService say it supports the value "DELETE" for it's "method" property.