I currently have the following method which creates a "share url" essentially the code to insert into an onclick="" within the app.
The problem is that now we can no longer have Facebook FBML applications, only iframe - is there a library I now need to include to make this work? Or should I be changing the code, I have Googled but answers are widely inconclusive or backhacks to force it to work.
public function getShareUrl($title, $url, $caption, $description, $imageSrc, $shareButtonText = 'Share your thoughts!')
{
$url .= "var attachment = {
'name':'$title',
'href':'$url',
'caption':'$caption',
'description':'".$description."',
'media':[{
'type':'image',
'src':'$imageSrc',
'href':'$url'
}]
};
var actionLinks = [{
'text':'Join the app now',
'href':'$url'
}];
Facebook.streamPublish('', attachment, actionLinks, null, '$shareButtonText');
return false;";
return $url;
}
Thanks all! :)
以上就是How do you create the "share" popup in an iframe Facebook app的详细内容,更多请关注web前端其它相关文章!