How do you create the "share" popup in an iframe Facebook app

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前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准