【发布时间】:2011-05-04 09:00:10
【问题描述】:
我目前有以下方法,它创建一个“共享网址”,本质上是插入应用程序内的 onclick="" 的代码。
问题是现在我们不能再拥有 Facebook FBML 应用程序,只有 iframe - 我现在需要包含一个库来使其工作吗?或者我应该更改代码,我已经用 Google 搜索过,但答案普遍没有定论,或者是回溯以迫使它工作。
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;
}
谢谢大家! :)
【问题讨论】:
标签: php javascript facebook fbml fbjs