I read a thing were if you have a ps3 account you can use that account on ps4 to play online for free is this true?
No. You seem to be confusing the difference between PS3/PS4 Multiplayer and a PSN Account on both systems.
When the PS4 was revealed it was also revealed that you needed a PlayStation Plus Subscription to play Multiplayer
Online multiplayer gaming on PlayStation 4 will require a PlayStation Plus subscription, said Sony in a video advertising the console's simple secondhand game process.
Sony also mentioned it in a slide during its E3 press conference.
The fine print in the video above notes, "PS4 multiplayer online access requires PSN account & PS Plus subscription."
prior to this Online Multiplayer was free on the PS3 and PS3 Games and one could sign up for Playstation Network and Playstation Plus Subscriptions on it, this was what made the PS3 the better choice for Online Multiplayer on Console as XBox Live Gold, which is the subscription service which was available for the XBox 360, was required for Online Multiplayer on the 360.
However a Playstation Network Account and Playstation Plus Subscription registered on a PS3 is the same as one registered on the PS4 and users who had either one on the PS3 could use them on the PS4 when it was released while likewise users who made their account on the PS4 could bring it onto their PS3.
this means if you create a Playstation Network Account on the PS4 and brought a PS3 you would be able to play free Online Multiplayer on the PS3 with it's games but not on the PS4 unless you have a subscription, and likewise creating an account on the PS3 wont let you "cheat" to get PS4 Online Multiplayer without the subscription, and because PS4 games can't be played on a PS3 you can't try and get PS4 games and run them on a PS3 to get the free PS3 Multiplayer on PS4 Games