Giter VIP home page Giter VIP logo

airtwitter-ane's People

Contributors

marpies avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

airtwitter-ane's Issues

why I can't get the PIN??

after the authorization interface, I call back to my app directly. I don't see the web page with PIN. Can you tell me my progress is right???
 and when i login ,the log is "login cancelled","Returned to app manually after login attempt, thus login cancelled".

my code:

 public function clickTwitterLoginIOSBtn():void {
 if( AIRTwitter.init( CONSUMER_KEY, CONSUMER_SERCRET, URL_SCHEME, onCredentialsChecked, true ) ) {
	trace( "ANE initialized" );
} else {
	trace( "ANE failed to init" );
}
}
		
private function onCredentialsChecked( credentialsValid:Boolean, credentialsMissing:Boolean ):void {
	if( credentialsValid ) {
		trace( "User credentials are valid - no need to login again" );
		/* You can use the rest of the AIRTwitter's API */
		return;
	} else if( credentialsMissing ) {
		trace( "User credentials are missing" );
		AIRTwitter.login(onTwitterLogin, true);
	} else {
		trace( "User credentials are invalid" );
	}
       }
private function onTwitterLogin( errorMessage:String, wasCancelled:Boolean ):void {
      if( errorMessage ) {
		trace( "Login error: " + errorMessage );
	} else if( wasCancelled ) {
		trace( "Login cancelled:" + wasCancelled );
	} else {
		trace( "Successfully logged in" );
		const user:AIRTwitterUser = AIRTwitter.getLoggedInUser( onLoggedInUserRetrieved );
		if( user ) {
		// cached value returned
		}
	}
}
// if cached value is not returned callback will be triggered
private function onLoggedInUserRetrieved(user:AIRTwitterUser, errorMessage:String):void {
	trace( user.name );
}

URL_SCHEME

The callback for AIRTwitter.init gives me: User credentials result: missing.

I'm testing on my Android phone. I've logged out of my Twitter account in the native Twitter app, and logged back in, twice. Still getting the same thing. Any suggestions on what I should look at next?

Attached is my app-xml.
RPTest-app.txt

Why I always "login cancelled"???how can I success to get the user info who is login

Now I can call back to my app ,but it always show the log of "login cancelled true"and"Returned to app manually after login attempt, thus login cancelled".

I want to login my app through twitter, how can I success to login ????and how can I get the ID of user who is login???Can you check my code ,where is the error caused the login cancelled????
My log is:

  ANE initialized
  [AIRTwitter] User credentials result: missing
  User credentials are missing
  [AIRTwitter] onInvoke standard
  [AIRTwitter] onInvoke standard
  [AIRTwitter] Returned to app manually after login attempt, thus login cancelled
  Login cancelled:true
  [AIRTwitter] onInvoke standard
  [AIRTwitter] onInvoke openUrl

my code is

public function clickTwitterLoginIOSBtn():void {
trace("clickTwitterLoginIOSBtn");
if( AIRTwitter.init( CONSUMER_KEY, CONSUMER_SERCRET, URL_SCHEME, onCredentialsChecked, true ) ) {
trace( "ANE initialized" );
} else {
trace( "ANE failed to init" );
}
}
private function onCredentialsChecked( credentialsValid:Boolean, credentialsMissing:Boolean ):void {
if( credentialsValid ) {
trace( "User credentials are valid - no need to login again" );
/* You can use the rest of the AIRTwitter's API */
return;
} else if( credentialsMissing ) {
trace( "User credentials are missing" );
AIRTwitter.login(onTwitterLogin);
} else {
trace( "User credentials are invalid" );
}
}
private function onTwitterLogin( errorMessage:String, wasCancelled:Boolean ):void {
if( errorMessage ) {
trace( "Login error: " + errorMessage );
} else if( wasCancelled ) {
trace( "Login cancelled:" + wasCancelled );
} else {
trace( "Successfully logged in" );
AIRTwitter.getLoggedInUser(onLoggedInUserRetrieved );
}
}
// if cached value is not returned callback will be triggered
private function onLoggedInUserRetrieved(user:AIRTwitterUser, errorMessage:String):void {
userID = user.id;
}

Please help me!!!!!

User credentials are missing error

Hello there!
Thank you for your extension! But, when I run the init function on IOS, i get "User credentials are missing" message. How can fix that, Where is my fault?

AIRTwitter.init( "3f9Pdz5VuAeJ5DFxUv68vHDIwsa", "IIjogkaSzBzKEmn7b2pAewEowvcHdDASD5452as8sDAy24aAm", "TwitterTestApp", onCredentialsChecked, true )

(These aren't my real key and secret)

Thank you!

Keep getting "User credentials are missing"

Hi,
first of all, thanks for this and your hard work! 👏🏻

I'm working on ios/android app built using starling & feathers. I keep getting "User credentials are missing" after the browser redirects me back to the app after the successful authorization in a browser.

Even though I call the AIRTwitter.init as soon as I can, I keep getting this error. I followed the documentation, check all issues but still does not understand why this is happening. Seems to me like the credentials information are not passed from browser (~ url scheme) to the app correctly.

Any thoughts?

Thanks.

Why I can't log the "login success" because "login cancelled",Please help me.

Thank you for your code .I have be successful to use the ane to login with twitter.But now it doesn't work.
when I click the button of "login", I can come back to my app successfully .But the ane will tell me
"Returned to app manually after login attempt, thus login cancelled". at first. Then tell me "[Airtwitter]login successful".
So Can you tell me the reason??
Can I give my suggestion to you ? Can you make the Event funcion of "onStatus" to be public.and When it determines." login success". Can you dispatch a event of the success.Then I can use the function of "addEventListener" to distinguish. Please Help me ??

qq 20170408180711

how to make the "Url Scheme" ?

hello:
I have a question in the ane, in the function of init , I don't know what is the URL SCHEME, Because my app don't have a url scheme, Can you help me??
@marpies

    public function clickTwitterLoginIOSBtn():void {
	trace("clickTwitterLoginIOSBtn");
           if( AIRTwitter.init( CONSUMER_KEY, CONSUMER_SERCRET,URL_SCHEME,onCredentialsChecked, true ) ) {
	        AIRTwitter.login(onTwitterLogin);

}

Issue in compiling ANE with other ANE's !

Hi,

when i m including twitter ane in my adobe air app, it is showing me error when building .apk file. I have attached image of error if you can help out it will be great.

I m using other anes as well, like google analytics, google services, goviral, storekit, easypush, etc.

twitter-error

I login with twitter account successfully,but I got a wrong twitter ID

Hello,I find a error of the ane .My twitter ID have 18 digits like "111111111111111111". And I use my twitter account to login to my app. and I login successfully. But When I want to get the twitter ID.
The result is "111111111111111100". the last two digits of the twitter ID will be "00". and the last third digit will rounding. but if the digit of twitter ID less than 16, the twitter ID I got will be correct

example:

Real Twitter ID : 111111111111111111         Obtained  Twitter ID: 111111111111111100
Real Twitter ID : 111111111111111155         Obtained  Twitter ID: 111111111111111200

Can you fix the error? Wish your answer

How can I monitor the success of login??? and then get the ID of login user..

    Thank you for you suggestion, Now I can log the message of"[AIRTwitter] Login success". But I also can't get the message of "Successfully logged in" from the call back of login function, But I want to get the user ID of login user. How can I monitor the success of login ?? and Which function I should use to get the user ID??Would you give the simple example to monitor the success of login and get the user's ID??? 

my step is :
when I click the button of "login in twitter", then it open the Safari to Authorization, and I click "agree" , then it will find my app, and it will be back to the login page of my app automatically. Why it will show that log of "Returned to app manually after login attempt, thus login cancelled".
my log like this:

t 5o xe7l tq7yub 0 c54

and my code is like that, but I can't get the user's ID,because the function of call back always "Login cancelled true".
fxm nres_ tgv 5_u_eqzu

Can you give some suggestion??

Sample File & Get Info

Hi @marpies,
I'm very happy seeing this ANE, it's really good to try on my apps. Well, if you dont mind, would u provide sample code?

According, the sample you gave, seems like u dont give us example how to get user info.

Thank u for the attention.

Regards

Export Build Error

I'm trying to integrate your ANE – great ANE by the way – and get a build error:

Error occurred while packaging the application:

aapt tool failed:Warning: AndroidManifest.xml already defines versionCode (in http://schemas.android.com/apk/res/android); using existing value in manifest.

Warning: AndroidManifest.xml already defines versionName (in http://schemas.android.com/apk/res/android); using existing value in manifest.

Warning: AndroidManifest.xml already defines minSdkVersion (in http://schemas.android.com/apk/res/android); using existing value in manifest.

Warning: AndroidManifest.xml already defines targetSdkVersion (in http://schemas.android.com/apk/res/android); using existing value in manifest.

C:\Users\danfl\AppData\Local\Temp\7020cf25-1c31-4481-b943-8325017eeeab\AndroidManifest.xml:107: Tag missing required attribute name.

Here's my - app.xml code:

			<activity 
        		android:name="com.marpies.ane.twitter.LoginActivity"
        		android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
        		android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"/>

    			<activity> 
        			<intent-filter> 
            			<action android:name="android.intent.action.MAIN"/> 
            			<category android:name="android.intent.category.LAUNCHER"/> 
        			</intent-filter> 
        			<intent-filter> 
            			<action android:name="android.intent.action.VIEW"/> 
            			<category android:name="android.intent.category.BROWSABLE"/> 
            			<category android:name="android.intent.category.DEFAULT"/> 
            			<data android:host="twitter_access_tokens" android:scheme="com.runpee"/> 
		            </intent-filter> 
    			</activity> 
    		
			</application>

		</manifest>

BTW, I'm only using this ANE to send simple tweets ( AIRTwitter.updateStatus ). Are there any unnecessary tags here?

Thanks,
Dan

error with updateStatus

way 1:
//bmd
var bitmap:BitmapData = new myBitmapData();//some bmd in library
//encode
var bytes:ByteArray = bitmap.encode(bitmap.rect, new PNGEncoderOptions());
var file:File = File.applicationStorageDirectory.resolvePath("tempTwitter.png");
var st:FileStream = new FileStream(); st.open(file, FileMode.WRITE); st.writeBytes(bytes); st.close();
//share
AIRTwitter.updateStatus("share text", onTwiiterShared, null, [file.nativePath]);

this will not work because the callback onTwiiterShared returns a errorMessage : Error creating data for upload.

way 2:
//bmd
var bitmap:BitmapData = new myBitmapData();//some bmd in library
//share
AIRTwitter.updateStatus("share text", onTwiiterShared, null, [bitmap]);

this will lead the app to crash.

so as a whole i can't do that in neither way.
according to the doc: media:Array (default = null) — List of media files (String - URLs to local and remote images, BitmapData) - max. 4.

i can't get the correct way to use this Parameter: media, please help, thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.