Decide where you want to hang the porch swing. There must be enough room between the back of the swing and the edge of the house and the porch railing so the swing does not come into contact with either when in use. Make a pencil mark on the ceiling of the porch when you have found the perfect spot.
Place the swing on the floor of the porch in the location where it will eventually hang. Using a string or rope, attach one end to the center of each handle of the swing and extend them vertically to the point directly above them on the ceiling. Place a mark on each location using a pencil. Take measurements of the two pencil marks based on distance from the house and the end of the ceiling. Gain access to the attic above and make pencil marks at the corresponding measurements. If they happen to land on a 2-by-4 joist you are in luck, if not, select the next stud away from the center of the swing and place a pencil mark in it. Obtain two heavy duty eyehole bolts at least 5 inches long. Using a drill bit the same width as the bolt, drill holes through your pencil mark, the joist and the ceiling beneath you. Have someone push the straight end of the eyehole bolt through the hole from beneath, and attach a washer and a nut firmly to both ends from the attic. Have someone hold the eye of the bolt while you tighten then with an adjustable crescent wrench.
If you do not have access to the attic above, see if there are screw or nail markings in the ceiling to denote where the 2-by-4 joists are. If these are not visible, use a stud finder to determine where the joists cross the porch. Make a pencil mark where the center of the joists nearest your previous marks are located. Select two joists with a distance apart at least as wide as your swing. Obtain two heavy-duty eyehole screws, and using a drill bit roughly half the diameter of the screws, drill guide holes through the ceiling and into the joists above. Start the eyehole screws into the holes by hand, and when they become tight, use pliers or an adjustable wrench to tighten them all the way.
Now that your eyeholes are in place, place an S-hook into each hole. Put your swing onto a table or other surface that is taller than the spot where the swing will hang. With extra slack in the chain, affix the center link of the chains, if it is one continuous chain, or the end of the chain, if the chains meet at a 'V' midway, to the unused part of the S-hook. Remove the table from below and let the swing hang.
Test with a medium weight before having the whole family pile on.