"YOU ARE MAYBE HAVING THE FOREACH because you are redirecting the callback with an including file where the oauth_token was created so when the callback file try to read the session is not the same that google was already authorized so $contacts its empty thats why" . <9lessons.info> . . .