Codeigniter, Gmail api and facebook api expert needed

Job ID: 31812510

Budget: €30 – €250 EUR

Hi have a page that runs every minute on cron.
It has google gmail api and facebook inbox api.

When the script runs it searches for messages in gmail and facebook inbox and puts them into my database. It worked flawlessly up until recently. When i first run the script i get this and noting gets inserted into the database

{"multicast_id":8972703127698726625,"success":0,"failure":9,"canonical_ids":0,"results":[{"error":"NotRegistered"},{"error":"NotRegistered"},{"error":"NotRegistered"},{"error":"NotRegistered"},{"error":"NotRegistered"},{"error":"NotRegistered"},{"error":"NotRegistered"},{"error":"NotRegistered"},{"error":"NotRegistered"}]}

Then i run it again and it works ok. So im not sure what the problme is and looking for someone that is familar with how this works?