If it is a fig--an unripe fig, I believe, contains toxins--the sap is poisonous.
The figs in my yard are green on the outside and pink on the inside when they are ripe. They are not poisonous. I gave one to my chickens that was split and they loved it and are fine.