Do as you would be done by, is the surest method that I know of pleasing. Observe carefully what pleases you in others, and probably the same thing in you will please others.

Lord Chesterfield (1694-1773) English statesman, wit [Philip Dormer Stanhope]
Letter to his son, #129 (16 Oct 1747)
    (Source)

A common theme in Chesterfield's advice, e.g.:

Letter #144 (9 Mar 1748):
Observe carefully, then, what displeases or pleases you in others, and be persuaded, that, in general, the same things will please or displease them in you.

Letter #229 (9 Jul 1750):
Pleasure is necessarily reciprocal; no one feels, who does not at the same time give it. To be pleased, one must please. What pleases you in others, will in general please them in you.