这是代码: -
FB.init({ appId: "APP_ID", nativeInterface: CDV.FB, useCachedDialogs: false });
FB.Event.subscribe('auth.login', function (response)
{});
FB.Event.subscribe('auth.logout', function (response)
{});
FB.Event.subscribe('auth.sessionChange', function (response)
{});
FB.Event.subscribe('auth.statusChange', function (response) {
if (response.status == 'connected') {
Ext.getCmp('facebookLoginButton').setHidden(true);
Ext.getCmp('facebookLogoutButton').setHidden(false);
}
else {
Ext.getCmp('facebookLoginButton').setHidden(false);
Ext.getCmp('facebookLogoutButton').setHidden(true);
}
});
function login() {
FB.login(
function (response) {
if (response.authResponse) {
Ext.msg('facebook logged-in', 'You are logged in successfully!');
} else {
Ext.msg('facebook logged-in', 'Error - You are not logged');
}
},
{ scope: "email, publish_stream" }
);
}
function logout() {
FB.logout(function (response) {
Ext.msg('facebook logout', 'You are logout successfully!');
});
}
function getLoginStatus() {
var isLoggedIn = false;
FB.getLoginStatus(function (response) {
if (response.status == 'connected') {
isLoggedIn = true;
} else {
isLoggedIn = false;
}
});
return isLoggedIn;
}
function shareLinkOnFaceBook(title, link) {
if (getLoginStatus()) {
var obj = {
method: 'feed',
link: link,
picture: 'https://www.XXXXX.data.gif',
name: title,
caption: '',
description: 'DEMO:-' + title
};
function callback(response) {
}
FB.ui(obj, callback);
}
else {
login();
}
}
(i) 在我的墙上分享链接后,Facebook 墙上缺少分享按钮。
(ii) 当我尝试使用以下查询查看发布网址的统计信息时:- 在此处输入链接描述, 然后我得到了 likes_count、share_count、comment_count(即使在点击喜欢并将评论放入评论框中)
请任何人都可以建议我在哪里缺少某些东西。如果需要更多描述,请告诉我。
谢谢,马尼什