public static void postEntity ( final Activity context , final Entity entity , final String text , final SocialNetworkShareListener listener ) { if ( proxy . isLinkedForWrite ( context ) ) { proxy . postEntity ( context , entity , text , listener ) ; } else { proxy . linkForWrite ( context , new SocializeAuthListener ( ) { @ Override public void onError ( SocializeException error ) { if ( listener != null ) { listener . onNetworkError ( context , SocialNetwork . FACEBOOK , error ) ; } } @ Override public void onCancel ( ) { if ( listener != null ) { listener . onCancel ( ) ; } } @ Override public void onAuthSuccess ( SocializeSession session ) { proxy . postEntity ( context , entity , text , listener ) ; } @ Override public void onAuthFail ( SocializeException error ) { if ( listener != null ) { listener . onNetworkError ( context , SocialNetwork . FACEBOOK , error ) ; } } } ) ; } }
Posts an entity to the user s Facebook wall . Post data can be customized by implementing the onBeforePost method in the given SocialNetworkListener .