Can I use the cookie c_user set by facebook?

本小妞迷上赌 提交于 2019-12-24 23:23:56

问题


Can I use cookie named c_user which contains the userid of facebook users who logged in? If it can be accessed by facebook php api, please provide me link.

$session = $facebook->getSession();

Few suggested to use this above code to get session, but this function is not defined in facebook-php-sdk.

Please show me a way to get user id of user currently logged in. Thanks


回答1:


Please show me a way to get user id of user currently logged in.

From http://developers.facebook.com/docs/reference/javascript/

FB.api('/me', function(response) {
  alert('Your name is ' + response.name);
  alert('Your id is ' + response.id);
});


来源:https://stackoverflow.com/questions/8740345/can-i-use-the-cookie-c-user-set-by-facebook

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!