Technical - Apple vs Facebook - COGS vs SG&A

Investment Banking Superday interview technical question - Apple vs Facebook - What are the key differences between COGS and SG&A?