Physically truss and beam both are same and the difference comes from the way they take load. Truss can take only axial load while beam can take moments also. So if you are interested in knowing the critical load of a truss (in physical world), in my opinion you should go for beam element and should apply load and boundary conditions in such a way that there is no moment transfer at the ends.
I fully agree with the method suggested by Mr.Naveen Bhatt. Buckling is essentially a bending process which requires beam elements for modelling. Truss or LINK elements lack the bending capability. However, to simulate the overall truss behavior, the joints have to be coupled in displacement dofs. Also, the support conditions also should have only displacement dof.