什么是OAuth的微博没有在Flash AS3 Web应用程序使用代理服务器或服务器端脚本的最佳方式? [英] What is the best way to OAuth twitter without use of a proxy server or server-side script in a Flash As3 Web Application?
本文介绍了什么是OAuth的微博没有在Flash AS3 Web应用程序使用代理服务器或服务器端脚本的最佳方式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我不能使用代理服务器。不能使用谷歌应用程序引擎等
我不能使用服务器端code。没有PHP或者Python。
我需要能够做到登录到Twitter和发布状态更新到Twitter通过一个ActionScript 3的Web应用程序。
最重要的事情显然让周围叽叽喳喳的跨域。是否有这样或一些干净的AJAX版本?
感谢您的帮助!
I can't use a proxy server. Can't use google app engine etc.
I can't use server side code. No php or python.
I need to be able to do logins to twitter and post status updates to twitter through an Actionscript 3 web application.
The biggest thing is obviously getting around twitter's crossdomain. Is there a clean ajax version of this or something?
Thanks for the help!
推荐答案
我有一些运气使用jQuery使用加载进到闪存:
I have had some luck using jQuery to load a feed into flash using:
JS
var flashObj;
$(document).ready(function() {
if (navigator.appName.indexOf("Microsoft") != -1) {
flashObj = window["adidasFlash"];
} else {
flashObj = document["adidasFlash"];
}
});
function loadTwitterFeed(screenName) {
$.getJSON("http://api.twitter.com/1/statuses/user_timeline.json?screen_name="+screenName+"&callback=?", function(data) {
console.log(data);
flashObj.tweetLoadComplete(data);
});
}
为
ExternalInterface.addCallback("tweetLoadComplete", tweetLoadComplete);
loadFeed("BarackObama");
function loadFeed(screenName:String):void {
ExternalInterface.call("loadTwitterFeed", screenName);
}
function tweetLoadComplete(obj:Object):void {
for each (var o:Object in obj) {
trace(o.text);
}
}
希望有所帮助。
Hope that helps.
这篇关于什么是OAuth的微博没有在Flash AS3 Web应用程序使用代理服务器或服务器端脚本的最佳方式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文