public static void get ( final Activity context , final String resource , final Map < String , Object > params , final SocialNetworkPostListener listener ) { if ( proxy . isLinked ( context ) ) { proxy . get ( context , resource , params , 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 . get ( context , resource , params , listener ) ; } @ Override public void onAuthFail ( SocializeException error ) { if ( listener != null ) { listener . onNetworkError ( context , SocialNetwork . TWITTER , error ) ; } } } ) ; } }
Performs a simple HTTP GET to the Twitter resource endpoint specified . If the user is not currently linked to a Twitter account they will be prompted to authenticate .