Loading Facebook fb:profile-pic via AJAX in Facebook Connect site

后端 未结 3 1096
悲&欢浪女
悲&欢浪女 2021-02-09 18:41

After a page loads, I\'m making an AJAX request to pull down an HTML chunk that contains tags representing a Facebook user profile picture. I append the result to a point in t

3条回答
  •  南旧
    南旧 (楼主)
    2021-02-09 19:35

    FB.XFBML.Host.parseDomTree did not work for me. maybe it has changed in the new api. what did work was:

    FB.XFBML.parse(document.getElementById('foo'))
    

    or

    FB.XFBML.parse()
    

    if you want the whole page parsed.

提交回复
热议问题