Unfortunately the train line between Sweden and Finnland is not served anymore. Take the bus from Luleå to the bordercity Harparanda/Tornio. The bus arrives at the bus station in Haparanda. From there you have to take a walk across the border to Finnland. Just behind the border you will find on the right side the tourist information. But go left to the city center of Tornio where you find the other bus station. Take a bus Kemi. In Kemi you can take a train of Finnish Railways. A oneway ticket to Oulu costs from 12 € to 17.90 € depending on the kind of train. If the ticket office is closed, you can by the ticket on the ticket machine (only in Finnish and Swedish language, credit card with PIN required) or, much easier, by the ticket on the train.
Works the same like above, just opposite direction: Take a train to Kemi, take the bus to Tornio, walk to the bus station in Haparanda, take the bus to Luleå.