javascript - Load youtube page via YQL with authentication -
since can't iframe youtube, i'd display page: https://www.youtube.com/comments (this page shows comments)
the yt api allows me request video-specific comments.
i'm logged in on youtube, how can request page authentication cookie/details via yql framework?
https://developer.yahoo.com/yql/
select * html url="https://www.youtube.com/comments"
it returns:
{ "query": { "count": 0, "created": "2014-11-07t10:05:17z", "lang": "nl-nl", "results": null } }
i going through blog post addresses issue of getting oauth work yql.
it suggests storing credentials in textfile url known [foo.txt
]:
env 'http://datatables.org/alltables.env'; set oauth_consumer_key = "yourconsumerkey" on twitter; set oauth_consumer_secret = "yourconsumersecret" on twitter; set oauth_token = "oauthtoken" on twitter; set oauth_token_secret = "oauthtokensecret" on twitter;
now can utilize yql.storage.admin
'embed' key-value pairs utilize yql query. official documentation:
yql provides 2 open info tables, yql.storage , yql.storage.admin, allow store , work info using yql itself. these default tables available in yql console under "yql" category. interact these open info tables using same keywords used other yql statements: namely select, insert, update, , delete.
so execute yql query:
insert yql.storage.admin (name,url) values ("keys","pathtofoo.txt");
this creates environment file queries. next time create phone call https://www.youtube.com/comments, these environment variables taken account.
there major caveat though, can utilize env link execute read requests, don’t straight have access keys. it's improve server side whenever possible. hope gets started in right direction.
javascript authentication youtube yql
No comments:
Post a Comment