title: Malformed Facebook Access Token
body: <p>I'm trying to use the Facebook Graph API to grab photo albums from Facebook and place them on a website I'm working on. I am using PHP as my language with the Codeigniter framework and am redirecting to a Facebook URL to get an access token for the user. Facebook returns an access token to me and I grab it and insert it into my database.</p>
  
  <p>That being said, when I try to grab the JSON data for the photo album by going to to a the graph URL, it returns an error. The graph URL and error are:</p>
  
  <pre><code>https://graph.facebook.com/1298926000574/photos?access_token=[MY ACCESS TOKEN]
  
  My access token: AQBxqdB64GHNTGY5Yp_IOuMY7NerwNtXVVrp2HwT1qXj02zqU-63KJDyB2jzqurlJ4M0vd7TAu7upA6T7ZYQzIChr2PgD1dpu-6Iebi0WVILbBSBOu-yj7sgcHSGS-Ew4Yio0I9In-1O5jOxbYLDMbI0Zmwk-F1-u-7a8iVvTJram8PvpmdRt5eg
  
  Returned error:
  
  {
  "error": {
    "message": "Malformed access token [MY ACCESS TOKEN]",
    "type": "OAuthException",
    "code": 190
  }
  } 
  </code></pre>
  
  <p>I'm really unsure why Facebook keeps returning this error to me. The access token is quite long and I'm storing it in my database as a "text" field. I followed their instructions and now they are shooting me in the foot. Any help would be much appreciated.</p>