开发者

Login with php and save users unique id

开发者 https://www.devze.com 2023-03-23 11:20 出处:网络
I have a website in which I am supposed to implement open Id . I am using smarty . Now I am totally messed up how to keep record of the user or to create session for the user since templates are htm f

I have a website in which I am supposed to implement open Id . I am using smarty . Now I am totally messed up how to keep record of the user or to create session for the user since templates are htm file in my case 开发者_运维百科

and in the facebook example we used php files to extract data of the user (http://excoflare.com/dev2011/socialnetwork/index.php?menu=openid&cmd=fb)

This is what I want :

  1. login using facebook ids
  2. save useer unique id to database


If you are using PHP SDK, you will find examples of how to get user data using the api. Or you will be able to get the user data by using

$userData = json_decode(file_get_contents('https://graph.facebook.com/me?access_token='.$accessToken)); 
var_dump($userData);
0

精彩评论

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