开发者

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.


  1. You need to start learning the concepts by reading the Facebook Documentation.
  2. Try using the Facebook PHP-SDK along with your approach, there's an example too!
  3. From the example above: $me = $facebook->api('/me'); will contain the user data
  4. 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>
  5. Welcome to Stackoverflow!
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜