I've setup a Facebook application and properly installed the Facebook Javascript SDK.
When visiting the site, user profile information is automatically displayed if they're logged into Facebook. (Exactly what I want).
I tried installing the PHP SDK earlier, however it requires the Connect and authorization, so once the page is loaded it will prompt me to Login - even though I'm logged into Facebook already. There are some other minor bugs I didn't like about the PHP SDK as well, so I've decided to ditch it and go with only the JS.
I can access the Profile name, email, gender, etc. and have those saved as separate JS variables as well as within separate
tags. The site is a WordPress site, and the goal is to automatically add anyone logged into Facebook as WordPress users.
- Visitor arrives at site and are logged into Facebook.
- The JS SDK retrieves their profile information.
- The information is displayed on the screen.
- ... Need to find a way to retrieve this information and place it inside
wp_create_user ('$facebookusername', $'facebookemail', 'defaultpassword')
I've been stuck on this problem for awhile and have only come up with the following possibilities.... - Access the cookie from Facebook ??? - Does the JS SDK include a JSON object that could be converted to a PHP array?
Thanks everyone and this site is excellent!