I put together a Robust Porter recipe and plan on using some walnuts I got from my friends place. Whats the best way to use walnuts in a beer? I was thinking about roasting them and putting them in the mash. Any advice?

I would roast them and add them, crushed, into the secondary if you want a walnut flavor. You could add them to the mash, but most of the flavor will be gone after the boil. Lager after secondary is through to get most of the oils to separate. I'm getting ready to do something similar with a peanut porter and will be making a walnut beer once they start falling from the tree.

Maybe try steeping some first and see how extraction goes - the papery skins on nuts are high in tannins which may make it easy to overshoot. You could also look into walnut liquor and try steeping them in alcohol before adding to secondary.