public static void tweetEntity ( final Activity context , final Entity entity , final String text , final SocialNetworkShareListener listener ) { if ( proxy . isLinked ( context ) ) { proxy . tweetEntity ( context , entity , text , listener ) ; } else { proxy . link ( context , new SocializeAuthListener ( ) { @ Override public void onError ( SocializeException error ) { if ( listener != null ) { listener . onNetworkError ( context , SocialNetwork . TWITTER , error ) ; } } @ Override public void onCancel ( ) { if ( listener != null ) { listener . onCancel ( ) ; } } @ Override public void onAuthSuccess ( SocializeSession session ) { proxy . tweetEntity ( context , entity , text , listener ) ; } @ Override public void onAuthFail ( SocializeException error ) { if ( listener != null ) { listener . onNetworkError ( context , SocialNetwork . TWITTER , error ) ; } } } ) ; } }
Tweets an entity . A share event will be recorded in Socialize and the entity URL generated by Socialize will be posted to the user s Twitter feed . If the user is not currently linked to a Twitter account they will be prompted to authenticate .