Can I use the cookie c_user set by facebook?

2019-09-07 04:37发布

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条回答
闹够了就滚
2楼-- · 2019-09-07 05:06

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);
});
查看更多
登录 后发表回答