S 12.18, PTS ii.22 
STAYING AT SĀVATTHĪ. Then the wanderer Timbaruka approached the Bhagavan, and having exchanged pleasantries, he sat to one side and asked a question.
Are happiness and unhappiness (sukhadukkha) made by one's-self (sayaṃ-kata)?
No, Timbaruko, that's not it, replied the Bhagavan.
Are happiness and unhappiness made by another (paraṃ-kata)?
No, that's not it.
Are happiness and unhappiness made by one's-self and others?
No, that's not it.
Do happiness and unhappiness appear without any reason?
No, that's not it.
Is there no such thing as happiness and unhappiness?
It's not that there is no happiness and unhappiness. Clearly there is happiness and unhappiness.
Is it that you don't know or see happiness and unhappiness?
It's not that I don't know or see happiness and unhappiness. I do know them, and see them.
Gotama, you've answered 'no' to all my questions. Please explain to me what you mean. Explain happiness and unhappiness to me.
Well Timbaruka, I do not say "happiness and unhappiness are caused by one's-self" because underlying that statement is the eternalist view that the experience (vedanā) and the one experiencing (so vedayati) are the same.
I do not say "happiness and unhappiness are caused by another" because underlying that is the view of one overcome by sensations, [i.e.] that the experience and the one experiencing are different.
Avoiding both of these positions I point to a foundation (dhamma) in the middle. With ignorance (avijjā) as condition there are volitions (saṅkhārā), and with volitions as condition there is consciousness etc... [i.e the nidāna chain] and thus the whole mass of disappointment comes about. With the complete cessation ignorance, volitions cease, with the cessation of volitions, ignorance ceases, etc... thus the whole mass of disappointment ceases.
When this was said the wanderer Timbaruka said Gotama I go for refuge to the Bhagavan Gotama, to the Dhamma and the community of Bhikkhus. Please remember me as a non-monastic disciple from this day forward.
I've translated sukha and dukkha as happiness and unhappiness here which is fairly conventional. On this level they represent the positive and negative aspects of experience, the things we find pleasing and displeasing, the aspects of experience on which we base our notions of happiness and unhappiness. However the words are used in a variety of ways, and there may be other interpretations. I've noted in my comments on Dhammapada v.1-2 that sukha/dukkha can represent nibbāna and saṃsāra for instance.
Timbaruka seeks to understand the problem of suffering in terms of self and/or other. The Buddha lets Timbaruka exhaust all the possible options within that paradigm without committing himself. It seems that some of the wanderers were a bit like the sophists in ancient Athens and some people these days, who go around just arguing with everything. One gets the sense that Timbaruka was ready to argue whatever the Buddha might agree with or disagree with. The fact that the Buddha does not take a stand on any of the views presented is a strategy Timbaruka has apparently not anticipated. The Buddha uses this strategy fairly often. The approach the Buddha takes is distinctly different to this one which proposes a dichotomy and then finds fault with all possible alternatives.
Having rejected the Timbaruka's terms the Buddha gives an explanation of why he is not interested in that particular argument, and then gives his alternative way of looking at things. There are two basic positions: the experience is either the same as the experiencer, or different. From the fact that the Buddha doesn't bother to answer the other variations proposed by Timbaruka, we might conclude that he does not take them seriously. His answer though partial from Timbaruka's point of view, covers the only sensible points.
We see that the rejection is in terms of Buddhist technical terminology, which reminds us that the story is told specifically for a Buddhist audience. Eternalism and nihilism as critical terms are distinctively Buddhist.
The first view - that suffering is caused by self - is that of the eternalist. The problem here is that we identify ourselves with experience, and see our self as continuous and lasting. This is almost the default setting for humanity: in effect we are our thoughts and emotions. By this I mean we don't consciously make this decision, it's just how things seem to us. As Thomas Metzinger says we are all 'naive realists'. However this leaves us with no real choice in how we respond to situations and causes us problems.  Elsewhere the Buddha uses the metaphor of intoxication (pamāda) to describe this condition.
The second view - that suffering is caused by other - is the view, not of the nihilist, but of someone overwhelmed by sensations [vedanābhitunna]. In this we aren't identified with the sensations, but feel compelled by them as when we are "overcome with grief", or we "see red". Again we often imagine that we have no choice about responding to powerful desires and aversions. Falling in love is such a powerful sensation, and chaos if not mayhem often ensues. The nihilist would presumably argue that ultimately there is no suffering (something I've heard Buddhists argue, to my consternation!)
To reiterate an important point: these 'views' are not conscious ideologies, not philosophies that we take on willingly. They are the default settings for human beings, a mixture of evolution and early conditioning; nature and nuture. Buddhists, like other religieux, tend to express a tinge of blame when describing the human condition. Although we reject the explicit notion of original sin, we smuggle through an implicit one. We often describe people as basically greedy and hateful for instance. I find this both philosophically problematic, and unhelpful. The Buddha here is arguing for a much less personal view of the problem of suffering. Suffering is not caused by oneself! At least in this text.
The kind of dichotomy that Timbaruka proposes doesn't apply in the Buddha's frame of reference. And note that what is being rejected is not the self/other dichotomy per se, but the idea that suffering comes from either. This is not advaita (non-dualist) philosophy, it is pragmatism aimed at relieving suffering. The kind of view which is engendered by mystical experiences such as oceanic-boundary-loss - i.e. all is one - is being criticised here, and throughout the Pāli canon.
In his explanation the Buddha focusses on how dukkha arises and ceases as an impersonal process. Understanding that experience is impermanent we see that there is nothing to identify with. Identity is just another experience - impermanent, disappointing, and impersonal. Experiences constantly arise and cease, meaning that there is nothing to hang on to, nothing to let go of even. Seeing experience as an impersonal process, in which the first-person perspective is a just another conditioned experience, means we don't blame anyone. If there is a painful state we see it has arisen dependently, and often we do have some influence on the conditions that contribute to suffering. Dependency does not do away with agency, at least not completely.
The more subtle point is that our own relationship to experience is the primary condition to think about. By dis-identifying with experience we make it less likely that we are either caught up in, or overwhelmed by experience, and we have a choice about being happy or unhappy that is not related to (not conditioned by) the particular experience we are having now. I have a growing suspicion that this is what asaṅkhata [unconditioned] means.
In a sense Timbaruka is right. Any view about happiness or unhappiness based on self and/or other leads to contradictions and argumentation. Human intercourse in any age has shown this to be true, and such tensions and disagreements continue to play out in human civilisations, even nominally Buddhist ones (2500 years, and we still can't agree on some things!). The problem is not this or that strategy for achieving happiness, but a fundamental mistake about the nature of happiness. What we naively pursue is not happiness, but following our evolutionary heritage and conditioning we pursue pleasant sensations. So we are not happy, and our conditioning says that someone must be to blame - if not me, then you, or him, or perhaps God or the Universe! In order to change this we need to step outside that frame of reference and see our experience in a completely new light - as impermanent and impersonal. Then a kind of happiness not conditioned by pleasant or unpleasant experiences can and does arise.
- main points identical to S 12.17. My translation.
- There is a distant echo here of the Brahmanical view that one achieves liberation through a comprehensive identification with the world, probably associated with the mystical experience sometimes described as oceanic boundary loss. The feeling of breaking down the subject/object distinction and identification with everything. Jill Bolte Taylor's description of this experience during a major stroke is instructive because she articulates the relevant aspects of it, even if a stroke is not attractive as a way to have that experience [See her TED presentation; and my response An Experience of Awakening?]. I say the echo is distant because I don't think that Brahmins are the target here. The target is everyday naive realism, the identification with experience as real.