admin管理员组文章数量:1431943
I need to link to the cover picture of an album on Facebook. This method works:
img.src = "/<album_id>/picture?access_token=' +
FB._session.access_token;
But using FB._session.access_token doesn't look right...is there a better way? A pointer to the relevant docs would be nice, I couldn't find it myself.
I can't make FB.api() work for this, probably because the response is a redirect to the URL of the actual image data.
I need to link to the cover picture of an album on Facebook. This method works:
img.src = "https://graph.facebook./<album_id>/picture?access_token=' +
FB._session.access_token;
But using FB._session.access_token doesn't look right...is there a better way? A pointer to the relevant docs would be nice, I couldn't find it myself.
I can't make FB.api() work for this, probably because the response is a redirect to the URL of the actual image data.
Share Improve this question asked Jan 18, 2011 at 10:05 ChopmoChopmo 1,4161 gold badge10 silver badges18 bronze badges1 Answer
Reset to default 3You could have a look here : How to get access token from FB.login method in javascript SDK
FB.login(function (response) {
if (response.session) {
var access_token = response.session.access_token;
alert(access_token);
} else {
alert('User is logged out');
}
});
本文标签: How do I get the Facebook access token when using the JavaScript APIStack Overflow
版权声明:本文标题:How do I get the Facebook access token when using the JavaScript API? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745580992a2664619.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论