It should be understood that Abdullah Ansari here speaks of friendship with God, or as he puts it, with Divine Truth. For more about this early Sufi, see this post.
The sign of acquiring the response of friendship
That which increases the splendour of friendship
The principal fund of the treasure of friendship
The fruit of the tree of friendship
The one who dissociates himself from this world and the Hereafter
The one who solicits from the Friend any gift but the Friend
Friendship is friendship with Divine Truth,
and all the rest is temptation.
Translation A.G. Ravan Farhadi