Reputation: 2181
I'm using a third party class that logs my Flash AIR iOS app into facebook.
I then want to log the user into my online database so they can access membership specific data.
To do this, I'm sending the token and user ID my iOS app receives from the thrid party login class to my php script, and set the token like:
$facebook->setAccessToken($token);
I then need to run...
$user_id = $facebook->getUser();
...so that FB can authenticate that token, so my server knows - yep - this token and id are legit - log this user id in or set up a new account if this id doesn't exist.
My questions:
expiry:64092211200000,Token is:CAAFvX6hOtj0BAFNcfr5xgixZAQAaf3Oqljsn3Sy946104f96CiTeZAHuGFoEiZAJTwyx6GMICKlCjj7YAXrE8bUuLKaTMIsUJYYJ9rGmiru3T9Fu6j2xwGxH0tLsMM3PdgL9Ox695wjSGE0sp4djcbHTXBIAvQ9dbfJ5kAXjRWmEoGfdASLeN8ndQeqhIKJzWNykx2SXHBjsE9XHIycaDHqfreMVXYAZDZD
Should I be using all that as the argument for $facebook->setAccessToken($token); , or just the string that comes after "Token is:"?
Thanks for your time and help.
Upvotes: 0
Views: 234
Reputation: 2098
The access token is just the part after 'Token is:', so in this case: CAAFvX6hOtj0BAFNcfr5xgixZAQAaf3Oqljsn3Sy946104f96CiTeZAHuGFoEiZAJTwyx6GMICKlCjj7YAXrE8bUuLKaTMIsUJYYJ9rGmiru3T9Fu6j2xwGxH0tLsMM3PdgL9Ox695wjSGE0sp4djcbHTXBIAvQ9dbfJ5kAXjRWmEoGfdASLeN8ndQeqhIKJzWNykx2SXHBjsE9XHIycaDHqfreMVXYAZDZD
Setting the access token is enough, there's no need to explicitly set the user id in the PHP facebook SDK.
Upvotes: 1