The Short Answer:
Like humans, guinea pigs have no issues with eating green beans. Although they are perfectly fine for guinea pigs to eat, you should not make them the core of any guinea pigs diet. They are perfectly healthy to give in small amounts every now and then as a healthy treat, but guinea pigs should be fed a variety of foods, and beans do not have all the nutrients guinea pigs need.
It is ok to give a few beans to a guinea pig once a week, but you should avoid feeding them beans too regularly. Make sure they have a balanced diet composing of many different types of food. Beans do have a large sugar content and can cause problems down the road if eaten too often.
The First Time:
The first time you give any new food to a guinea pig you should give a small amount and watch to make sure it is not allergic to the food. If it is ok with the food, and not acting strangely while eating it, or for up to 15 minutes after eating, then you can feed more.