Is there any known api or connectivity to Twitter Vine? - twitter

Either via its own api or via the twitter api?
There are a couple of apps: http://www.vineroulette.com/ and http://vinepeek.com/ has anyone got an idea of how they get the vine feeds?

Well, not for the moment according to some requests inside the twitter support: https://dev.twitter.com/discussions/14721
The only things I can find right now is the card used inside a tweet. For example: http://vine.co/v/bwBYItOUKrw/card
My own search
I took some times so see what kind of request does Vine on iOS, using Charles.
First, I checked Tweetbot to see how it retrieve the Vine preview image for its feed. A simple GET on the Vine video to retrieve header metas and get the preview:
<meta property="twitter:image" content="https://vines.s3.amazonaws.com/thumbs/8800194F-D323-40F2-8AD2-7C19EA2505A3-3974-000000D33D0303AB_1.0.6.mp4.jpg?versionId=PZAXllJkKvo4FGk47Mb4JfM7yADdF5eC">
Which is:
In same meta, you can retrieve the video stream:
<meta property="twitter:player:stream" content="https://vines.s3.amazonaws.com/videos/8800194F-D323-40F2-8AD2-7C19EA2505A3-3974-000000D33D0303AB_1.0.6.mp4?versionId=gqt.N2z3cdss2nzFam5zam4QR9sje_vC">
Then I opened Vine app. And it makes a request to https://api.vineapp.com/. Since everything is send though https, I can only see the request / response encrypted.
Something more interesting
With the api url, I searched on Google and find interesting stuff ! One guy dig better inside Vine request by acting as a man in a middle to see the real request url. There are 3 articles. At the end, the guy successfully posted a video on Vine using its own client.
After that, I checked on Github and found one non-official Vine API using Python. People seems to use the work from the previous guy to determine API full url.
And here is a built-in interface in PHP of this non-official API.
I think you have enough stuff to start your own VineRoulette :)

Related

YouTube Video Embed iFrame Failing On Membership Videos

I've posted on YouTubes community page and I've heard nothing back from them so I'm going to see if someone here can help me figure this out.
A few days ago the embedded videos on my website just stopped working: https://enlighten-university.com/course.html.php?active=3
At first, I thought it was maybe a problem with my iFrames or an API on the website but when I visited YouTube I discovered the same problem on their website:
So I figured maybe YouTube itself was down but when I checked my other videos, videos that are not a part of my membership program, the embed function seems to work fine.
So then I hit f12 and there I've discovered the problem. The YouTube embed function relies on a header, a Google header, that lets the server know that the person trying to watch the video is in fact a member. Their Google account has to follow them, but for some reason, that header is no longer working.

Live events not showing in YouTube Data API v3

I'm sending a get request to a link like this:
https://www.googleapis.com/youtube/v3/search?part=snippet&channel_id=[MyChannelId]&type=video&eventType=live&key=[MyKey].
The purpose of it is to get the live events of a specific channel for which I provided its ID.
The problem is this does not work all the time.
When I go checking in YouTube, the channel is streaming, but I don't get any data through this link.
What are the possible mistakes that may cause this?
Or is it just a problem from their servers?
Is there an alternative reliable way?

All data except for fileName disappears from fileDetails in a couple of days after uploading the video

I'm using YouTube Data API (v3) to access my own video info.
Everything worked fine, I could get fileDetails.fileSize, fileDetails.videoStreams[] etc. as I expected.
However, in a couple of days after I uploaded the video, the same API returns only fileDetails.fileName and no other info anymore.
Now returned json looks like this:
"fileDetails": {
"fileName": "test movie.mp4"
}
Here is my request URL:
https://www.googleapis.com/youtube/v3/videos?part=fileDetails&id=__my_video_id__
The video is owned by my account with which I did OAuth and got an access token.
I tried the URL on OAuth 2.0 Playground (https://developers.google.com/oauthplayground/), but I got the same result though once it returned all data when I tried it on the day I uploaded the video.
I wonder it might be related to the video visibility since I set it to unlisted so that others won't find my test video by searching.
Any info is welcome!
Edited:
The video itself doesn't have any problem. I can play it on YouTube and via YouTube iframe API also.
I'm aware that YouTube has a system which automatically detects copyright infringements, however, this issue seems to happen randomly even when we don't violate any copyright of others. (happens with our original videos too)
We finally decided to cache fileDetail on our backend.

How to know when a user complete viewing a video with youtube api?

I currently working on a project where I send a youtube video id and show it to the user. And I want to know if there are a method to know when the video is completely viewed by the user. In my application's client, I send a response to the server when the view is completed, and I want to prevent receiving falsed data from untrusted user. And that's why I want to know if youtube api make a things like that. I have seen other similar topics, but I haven't found a safe way to secure communication between client and server for this problem.
Thank you.
From this SO post, it was mentioned that you can use onStateChange event to log that a user viewed a video. But the general idea here is about safety which I think is more important, from there I don't think you can do this as per the privacy of a user. You can understand more about YouTube Reporting and Analytics here.

How to get Youtube's Trending Music Feed using its API

Basically, what I want to get is Youtube's Trending Music in UK. I want to get the videos that are recently uploaded and is trending starting with few views.
Example:
http://www.youtube.com/channel/HCp-Rdqh3z4Uc/videos?query=NErAuLQauvw&view=22&feature=g-logo
I am confused which one of the feeds below is more applicable to me.
https://gdata.youtube.com/feeds/api/channelstandardfeeds/most_viewed?time=today&v=2
https://gdata.youtube.com/feeds/api/standardfeeds/UK/on_the_web_Music
Please help me with this. Your answer and ideas will be greatly appreciated. Thanks
Youtube channels usually start with the prefix UC. In this case the channel starts with HC what for as for I know means hidden channel. This means that you can only access them via the api if you have the right credentials.
This channels are maintained by youtube and they do not share that info for third party apps.
So if you want to rip it you will have to make a own webservice that searches the youtube site and stores the video id's or build an html parser or something like that in your application.

Resources