Embedding Youtube Videos on user's wall with the Javascript API - youtube

I'm attempting to embed a Youtube video on a user's wall using the Javascript API. I've poured over a bunch of different tutorials and came up with this:
var data = {
method: 'feed',
link: current_video_url, // Link to the vide on our site
source: current_video_src, // Link to the Youtube video, http://youtube.com/v/[hash]
picture: current_picture_url, // Thumbnail from youtube
title: current_video_title, // Title from our page
caption: current_video_description // Text from our page
}
FB.ui(data);
Running the Facebook Debugger shows that the current_video_url link is being properly parsed for OG tags and is available as an embedded video. I ran a debugger and all the variables are being properly set in the data variable.
This worked fine for about 2 days, and then we pushed the site live. We set up a new AppID in Facebook but now all the videos are just thumbnails instead of being embedded in the user's wall. I thought maybe this is a problem with the live site but now the dev site is broken too.
What's the best way to get this to work consistently?

Related

How to bulk update youtube videos description

We just changed the structure of our website and now we have to update the description of all our YouTube videos (around 750 video); in the description there should be a link to our website to buy the pdf file of the musical sheet shown on the video, and the new link structure is "example.com/?v={the yt video id}" (ex: example.com/?v=EIghgjBddo)
the new description template should be like this
Buy the pdf file: example.com/?v=EIghgjBddo
Facebook: fb.com/xxx
Pinterest: pinterest.com/xxx
don't forget to subscribe and like...
...
Is there a way to automatically bulk generate all the descriptions at once using some google API, because it is almost impossible to be done manually. the website is working with php and and jquery if that could help

Youtube API v3 upload get Video Link

I am new to the Youtube API.
I am trying to use it to upload a file through my page on youtube.
Everything is working, and the File gets uploaded.
Now i want to display the link to the Video, so i can save it in the database. Its also enough if i can log it in the console and make an ajax call to save in the db.
The point is, i dont know how to get it.
I am using exactly the code form here:https://developers.google.com/youtube/v3/code_samples/javascript
You have it already, it's the video id in the response after you upload.
https://developers.google.com/youtube/v3/docs/videos#resource
Then the url is like this - https://www.youtube.com/watch?v=id

Embed Instagram photo using Pusher

In my application I use Pusher in order to publish content in realtime.
Recently I added Instagram content, which is published also via Pusher. It means that without reloading the page, an Instagram entry might appear.
I use the embed code Instagram supplies:
<blockquote class="instagram-media" .....
:
:
Usually there is no problem. But from time to time I get the content without the image, and instead a gray camera icon:
When I refresh page, usually I can see the photo.
Looking for some hint in console, this is what I got under Network tab:
Any idea?

Verify User Watched YouTube Video in Backbone App

I have a Backbone Marionette app with a Rails back-end. I need to be able to display a youtube video in a mobile browser on the Backbone side. Easy enough.
The place I'm running into trouble is figuring out how to validate that a user completely watched a video. Does anyone know how I can do this?
So far I'm letting the user view the video via jquery_youtube which more or less just wraps the youtube video in a modal window.
I'm not too familiar with the Youtube API but it seems like player.getPlayerState() = 0 might be what I'm looking for.
I was thinking that perhaps I could do
events:
"beforeClose .ui-dialog-title": "checkVideoStatus"
checkVideoStatus: (e) ->
console.log e
console.log "log"
and then in the check video status I could verify that player.getPlayerState() = 0 but I can't seem to get the log statements to fire which of course is because the dialog modal is outside of this view.
Any ideas for how I can verify that the user watched the video?

Youtube-API: How to determine if I liked a video before?

I am developing a client of Youtube for iOS devices. I want to check if logged user did Like or dislike a specified video or not. But I can't find any support API (here)
When I load the feed of videos, I just found rating information below , No thing shows that logged user liked or disliked this video.
{
"gd$rating":{
"average":4.8963733,
"max":5,
"min":1,
"numRaters":193,
"rel":"http://schemas.google.com/g/2005#overall"
},
"yt$statistics":{
"favoriteCount":"0",
"viewCount":"111626"
},
"yt$rating":{
"numDislikes":"5",
"numLikes":"188"
}
}
Did I make any mistake?
It can be done using YouTube Data API v3.
https://developers.google.com/youtube/v3/docs/videos/getRating
This is API v3, checkout this page :
https://developers.google.com/youtube/v3/docs/playlists
Currently, The official client youtube on android and iOS devices does not support this. User can't see that he/she liked or disliked a video. And, when I press "like" or "dislike" on iPad youtube app, the number of like on the youtube web does not change.
Unbelievable!

Resources