Thursday, May 28, 2015

Facebook SDK has js error "Error: element not specified"

It might be Facebook SDK bug on Chrome, because same code works well on Firefox. From stackoverflow, others suggest to try display: popup instead of default 'iframe' value for feed dialog. 

http://stackoverflow.com/questions/15438961/fb-ui-returns-error-element-not-specified

The pseudo code looks like below

FB.ui({
    method : 'feed',    
    //display: 'popup',
    link : {link},
    caption : {caption},
    description : {description},
}, function(response) {
        if (response && response.post_id) {
        } else {
        }
    }
}); 

No comments:

Post a Comment