我正在关注这篇文章,它有一个非常简单的代码来发布来自 flex 应用程序的推文。
http://rjdesignz.com/adobe-flex/twitter-api-in-air-mobile-app/
这适用于 AIR 移动应用程序,但我正在 Flex 中制作 AIR WindowedApplication,上面的帖子依赖于以下外部库:
1) AS3 oAuth 库http://code.google.com/p/oauth-as3
2) AS3 加密https://code.google.com/p/as3crypto/
这是代码:
import org.istashan.oauth.OAuthConsumer;
import org.istashan.oauth.OAuthRequest;
import org.istashan.oauth.OAuthSignatureMethod_HMAC_SHA1;
import org.istashan.oauth.OAuthToken;
import org.istashan.utils.OAuthUtil;
private var requestToken:OAuthToken;
private var accessToken:OAuthToken;
private var oAuthConsumer:OAuthConsumer;
private var accessRequest:OAuthRequest;
protected var signature:OAuthSignatureMethod_HMAC_SHA1 = new OAuthSignatureMethod_HMAC_SHA1();
对于所有变量,我收到以下错误,因此我无法编译我的代码:
1046: Type was not found or was not a compile-time constant: OAuthConsumer.
1046: Type was not found or was not a compile-time constant: OAuthRequest.
1046: Type was not found or was not a compile-time constant: OAuthSignatureMethod_HMAC_SHA1.
1046: Type was not found or was not a compile-time constant: OAuthToken.
1046: Type was not found or was not a compile-time constant: OAuthToken.
我该如何解决这个编译时常量问题?