gpt4 book ai didi

javascript - 在没有请求访问 token 的情况下检查用户是否喜欢 Facebook 页面

转载 作者:行者123 更新时间:2023-11-28 08:50:46 27 4
gpt4 key购买 nike

 window.fbAsyncInit = function() {
FB.init({
appId : '********', // App ID
channelUrl : document.location.protocol + '//connect.facebook.net/en_US/all.js', // Channel File
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});


var fql_query = "SELECT uid FROM page_fan WHERE page_id = "+page_id+"and uid="+user_id;
FB.Data.query(fql_query).wait(function(rows) {
if (rows.length == 1 && rows[0].uid == user_id) {
console.log("LIKE");
$('#container_like').show();
} else {
console.log("NO LIKEY");
$('#container_notlike').show();
} }

只是我需要检查用户是否喜欢 Facebook 页面,而不请求任何访问 token 或权限,这可能吗???

最佳答案

如果我正确理解你的话,我认为这是不可能的......最终你总是需要用户授权你的应用程序并获取身份验证 token 才能知道用户的 ID。未经用户许可,FB 不会让您知道用户的 uid

关于javascript - 在没有请求访问 token 的情况下检查用户是否喜欢 Facebook 页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19163343/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com