how to Personalize my site using facebook
i want to integrate facebook login in my site and want to extract information from user. here is my code
<html> <head> <title>My Facebook Login Page </head> <body> <div id="fb-root"> <script src="http://connect.facebook.net/en_US/all.js"> <script> FB.init({ appId:'my app id', cookie:true, status:true, xfbml:true }); </script> <h3>Welcome to my site</h3> <fb:login-button>Login with Facebook</fb:login-button> </body> </html>
Here is the link click here of my site ever开发者_StackOverflowything is ok but my question what should do after this how can i use graph API to extract user information using php. any help with example would be greatly appreciated.
- You need to start learning the concepts by reading the Facebook Documentation.
- Try using the Facebook PHP-SDK along with your approach, there's an example too!
- From the example above:
$me = $facebook->api('/me');
will contain the user data - Depending on your needs, you may need to request additional permissions from the user. This can be done like this:
<fb:login-button perms="user_birthday"></fb:login-button>
- Welcome to Stackoverflow!
精彩评论