I used a form to capture data from clients. In this form is an iframe that loads youtube videos onto youtube. The reason for the different URL is because my original code was written in CakePHP and the youtube api uses the Zend Framework.
Now I need the values returned from youtube that is stored in the URL of the iframe to save in the DB, so that when called later the video will open with the correct listing.
Any advise?
There is no way to get any information about pages loaded into an iframe if the document loaded into it comes from a different domain. This is due to the same origin policy.
YouTube has an API that allows people to perform searches of YouTube from your website. You could use that to allow people to select videos instead of trying to reverse engineer the YouTube URI system.
Related
I am writing a program in PHP that requests a domain name from the user, and from this the user will be displayed with social networking information (likes, shares, comments etc) about the domain.
I have tried using several techniques, including;
"https://graph.facebook.com/v2.1/?id=www.ebay.co.uk"
Although this has a response, it seems to have given me Facebook information regarding the a singular page (home page), instead of the entire site.
Is there a way for me to find the Facebook page of a company when I only have their domain name available?
Any time would be appreciated! Cheers!
The Open Graph Protocol is not hierarchical, but a flat structure.
Each page with an og: tag is treated as a completely distinct element.
Is there a way for me to find the Facebook page of a company when I only have their domain name available?
You can use the og:site_name tag if it's available on the website.
Take tutsplus.com as an example, they have the og:site_name tag with "tuts+" as the value. When searching facebook for a fanpage with the name "Tuts+" you will find facebook.com/tutsplus as the first result.
how can i use php to get youtube user subscription channel videos and display all the channel feeds, i want create a class or function where if i pass a user name the php class would retrieve the latest uploads / activities in the user subscribed channels and display the url plus the title and the image, also i want to be able to pass the title and url to other functions so that i can save it to database. on a another page i found this Pulling in YouTube Videos from Specific Channel but its for only one specific channel.
The relevant requests are for the newsubscriptionvideos feed in the YouTube GData API v2 or activities.list() in the newer YouTube Data API v3.
newsubscriptionvideos might not be natively support in the Zend GData client library (I don't see it mentioned in the developer's guide), so if you go that route, you should probably use alt=jsonc to get back an easy-to-parse JSON feed of the data. E.g, https://gdata.youtube.com/feeds/api/users/jeffposnicktest/newsubscriptionvideos?v=2&alt=jsonc
The alternative is to use v3's PHP client library to call activities.list().
In a PHP system, my client suggested to download videos AND MAINLY captions from YouTube using the following tools:
cclive
gcap
As I have never heard of these before, my question is does anyone have any experience with them? Both projects seem to be inactive for like one year or so... Do they still work?
Is it possible to download captions for any YT video with them? I have stumbled upon some YT API info that the captions are not available for unauthorized users (i.e. you can only get your own captions if you are authorized with the API)?
Caption tracks can only be accessed via the Data API by the authorized owner of a given video.
The official YouTube Players can access caption data, but they use a different mechanism for accessing that data which is not part of a public API.
We are developing a facebook iframe application that pulls some images (via an API) to the current user album (creates a new one).
The user views his newly uploaded album photos using a facebook lightbox clone. In this clone he must be able to comment and like the current viewed photo.
Is there a way to provide facebook comments & like to these pictures without the use of the Graph API (which would require us to replicate a lot of visuals).
Another try was the social plug-ins with the facebook photo url given but no success.
Any ideas?
I would recommend using the social plugins that facebook provide.
For the likes and comments you can specify a URL in the plugin code, that URL should be the URL of the photo relative to your app e.g. http://myapp.com/photo/123 and not the http://app.facebook.com address.
Facebook will need to be able to crawl that URL so if you are checking if the user is logged in via PHP then you should either disable this if the user agent contains facebookexternalhit or show a different page for that user agent. It doesn't matter about the content, just set a couple of og: meta tags and that should be fine.
What I want to do is, to show uploaded videos list of my youtube channel to website's visitors.
Something like that. (Image take from youtube channel, I want to show exactly this way)
Don't want to create iframe. Can I fetch data from channels exact page with PHP or something else? I have no idea if it's possible with youtube api. Any suggestions?
Yes you can. The videos on a channel are essentially a user's so using the YouTube GData API you can make a call to http://gdata.youtube.com/feeds/api/videos?author=ahmednuaman (my videos for example).