什么是OAuth的微博没有在Flash AS3 Web应用程序使用代理服务器或服务器端脚本的最佳方式?代理服务器、服务器端、应用程序、脚本

由网友(浅夏)分享简介:我不能使用代理服务器。不能使用谷歌应用程序引擎等我不能使用服务器端code。没有PHP或者Python。我需要能够做到登录到Twitter和发布状态更新到Twitter通过一个ActionScript 3的Web应用程序。 最重要的事情显然让周围叽叽喳喳的跨域。是否有这样或一些干净的AJAX版本?感谢您的帮助!...

我不能使用代理服务器。不能使用谷歌应用程序引擎等 我不能使用服务器端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.

阅读全文

相关推荐

最新文章