ginatrapani/ThinkUp — Issue #1050: Add support for Facebook accounts without user profiles
Author: cwarden
Created: 2011-10-14 22:14:24+00:00
State: open

It's possible for Facebook accounts to not have a user profile.
Log out of Facebook, visit http://www.facebook.com/pages/create.php, create a new page with a new account.

This account will not have a user profile:
https://graph.facebook.com/me returns false, but https://graph.facebook.com/me/accounts returns the page.

Trying to add this user to ThinkUp results in an error when FacebookPluginConfigurationController::saveAccessToken tries to save the user:
```
Database error!
ThinkUp could not execute the following query:
INSERT INTO instances (network_user_id, network_username, network, network_viewer_id) VALUES (:user_id , :username, :network, :viewer_id)
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'network_username' cannot be null
```