Extjs 使用youtube api oAuth的sencha touch 2
有没有关于如何将Sencha Touch 2与youtube API OAuth集成的示例? 根据GoogleAPI文档和示例,我在我的应用程序中使用了基于javascript的GoogleSign-on按钮呈现。但是,我在切换http与https上下文时遇到了跨源问题 Blocked a frame with origin "https://accounts.google.com" from accessing a frame with origin "http://localhost:1841. Protocols, domains, and ports must match 用“原点”阻止帧https://accounts.google.com“从访问具有原点的帧”http://localhost:1841. 协议、域和端口必须匹配 不支持用于身份验证请求的http协议 Note: Requests to Google's authorization server must use https instead of http because the server is only accessible over SSL (HTTPs) and refuses HTTP connections.Extjs 使用youtube api oAuth的sencha touch 2,extjs,youtube-api,sencha-touch,sencha-touch-2,google-oauth,Extjs,Youtube Api,Sencha Touch,Sencha Touch 2,Google Oauth,有没有关于如何将Sencha Touch 2与youtube API OAuth集成的示例? 根据GoogleAPI文档和示例,我在我的应用程序中使用了基于javascript的GoogleSign-on按钮呈现。但是,我在切换http与https上下文时遇到了跨源问题 Blocked a frame with origin "https://accounts.google.com" from accessing a frame with origin "http://localhost:184
{
styleHtmlContent: true,
html : '<a href="https://accounts.google.com/o/oauth2/auth?client_id=MY_CLIENT_ID&redirect_uri=MY_REDIRECT_URI_AS_CONFIGURED_IN_GOOGLE_CONSOLE&scope=https://www.googleapis.com/auth/youtube&approval_prompt=auto&response_type=token">Login to youtube</a>'
}
launch: function () {
if ( window.location.hash ) {
this.onAuthRedirect();
}
// Destroy the #appLoadingIndicator element
Ext.fly('appLoadingIndicator').destroy();
// Initialize the main view
Ext.Viewport.add(Ext.create('MyApp.view.Main'));
},
onAuthRedirect: function () {
if (window.location.hash) {
var params = window.location.hash.substring(1).split('&');
if (params[0].split('=')[0] == 'access_token') {
var access_token_value = params[0].split('=')[1];
//validate access_token and proceed with youtube access api stuff
}
}
},