我正在开发一个Wordpress页面来获取用户相册,并使用Facebook为每一张相册提供照片
这是我的代码:
function myFBcall(){
FB.login(function(response) {
console.log(response);
if (response.authResponse) {
console.log('Welcome! Fetching your information.... ');
FB.api('/me?fields=id,name,albums,photos', function(myalb) {
console.log(myalb);
jQuery( "#facebookimages" ).html('<h3>My Albums :</h3>');
jQuery.each( myalb.albums.data, function( i, val ) {
/* make the API call */
FB.api(
"/"+val.id+"/picture",
function (mycover) {
if (mycover && !mycover.error) {
jQuery( "#facebookimages" ).append( "<div class='myalbum'
onClick='javascript:getmyphotos(\""+val.id+"\",\""+val.name+"\")' ><img src='"+mycover.data.url+"' width='90%' height='90%'/>"+val.name+"</div>" );
}
}
);
});
});
} else {
console.log('User cancelled login or did not fully authorize.');
}
},{ 'scope': 'user_photos,publish_actions','return_scopes': true });
}它与在我的Facebook应用程序中注册为开发人员或管理员的用户一起正常工作
但不与我的WordPress用户一起工作
如何使它与我的wordpress网站上的所有用户一起工作??
有什么帮助吗?
发布于 2014-07-18 03:29:13
While I don't have specific knowledge about wordpress, in general, you would need to ask those permissions. If your app was created after april 30, asking for extended permissions require Facebook approval. Read more here: developers.facebook.com/blog/post/2014/04/30/… – Ibrahim yesterday
谢谢易卜拉欣,你的回答是和我一起醒过来的,我请求( user_photos)许可,facebook批准了,现在起作用了,
https://stackoverflow.com/questions/24769272
复制相似问题