Place cranberry sauce in a saucepan; beat until smooth.
Bring to a boil over medium heat.
Stir in gelatin and sugar; simmer 10 minutes, stirring frequently until gelatin is dissolved.
Remove from heat.
Stir in fruit pectin.
Add nuts and stir 10 minutes to keep nuts from floating.
Pour into buttered 9-inch square pan.
Chill until firm, about 2 hours.
Sprinkle sugar or flaked coconut on a sheet of waxed paper.
Turn candy out onto paper; cut into 3/4-inch squares with spatula dipped in warm water.
Roll each square in sugar.
After about an hour, roll in sugar again to prevent stickiness.